instruction
stringlengths
2
259
⌀
input
stringlengths
0
442
⌀
output
stringlengths
1
1.9k
⌀
text
stringlengths
273
2.08k
⌀
Create a program that takes in a list of numbers and returns the product of all the elements in the list.
[2, 4, 10, 5]
def product(nums): total = 1 for num in nums: total *= num return total
null
Stručně shrň článek o tématu „Prevail II“ a uveď hlavní fakta.
**Prevail II** je páté studiové album kanadské heavymetalové hudební skupiny Kobra and the Lotus. Vydáno bylo 27. dubna 2018 prostřednicím společnosti Napalm Records. Jedná se o sequel k předchozí desce Prevail I, která byla po tříměsíčním odkladu vydána v květnu roku 2017. Odkladu se dočkalo také Prevail II. To mělo ...
null
Summarize key facts about „Waitakaruru River“ clearly and accurately.
**Waitakaruru River** The Waitakaruru River is a river of the Waikato Region of New Zealand's North Island. It flows initially north before turning northwest across the northwestern corner of the Hauraki Plains, reaching the southwestern corner of the Firth of Thames close to the settlement of Waitakaruru. Grey mangro...
null
Name the planet known as the Red Planet.
Mars.
null
Spočítej: 17 + 4 = ?
17 + 4 = 21
null
Summarize key facts about „Bobby Charles“ clearly and accurately.
**Bobby Charles** Robert Charles Guidry (February 21, 1938 – January 14, 2010), known as Bobby Charles, was an American singer-songwriter. Early life An ethnic Cajun, Charles was born in Abbeville, Louisiana, and grew up listening to Cajun music and the country and western music of Hank Williams. At the age of 15, he ...
null
Write a module in Rust to identify palindromic strings.
fn is_palindrome(target: &str) -> bool { let mut char_vec: Vec<char> = target.chars().collect(); char_vec.reverse(); let reversed_target: String = char_vec.into_iter().collect(); if target == reversed_target { return true; } return false; }
null
Create a new array containing the result of applying a given function to each element of an original array.
Array: [1, 2, 3, 4] Function: x * 2
new_arr = [i*2 for i in [1, 2, 3, 4]]
null
Spočítej 12×10
12 × 10 = 120
null
Spočítej: 22 + 8 = ?
22 + 8 = 30
null
Stručně shrň článek o tématu „Shazad Latif“ a uveď hlavní fakta.
**Shazad Latif** Shazad 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 ...
null
Parse the JSON data stored in a variable 'data' and print out the value of the key 'name'.
data = { "name": "John", "age": 30, "status": "single" }
import json data = { "name": "John", "age": 30, "status": "single" } data =json.loads(data) print(data['name'])
null
Write a SQL query to find the titles of movies released between the years 2000 and 2010.
SELECT title FROM movies WHERE release_year BETWEEN 2000 AND 2010;
null
Summarize key facts about „Puremāhaia River“ clearly and accurately.
**Puremāhaia River** The Puremāhaia River is a river of the Tasman Region of New Zealand's South Island. It flows northeast through Puramāhoi, where it crosses under State Highway 60, before reaching Golden Bay five kilometres northwest of Tākaka. See also List of rivers of New Zealand References Rivers of the Tasman ...
null
Implement the merge sort algorithm to sort a given array ascending.
given_array = [7,9,3,8,1]
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+=...
null
Design a CSS style sheet to format a web page.
body { background-color: #FFFFFF; font-family: Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px; } h1{ font-size: 1.5em; font-weight: bold; } p { line-height: 25px; margin: 15px 0px; }
null
Stručně shrň článek o tématu „Vídeňský slepičák“ a uveď hlavní fakta.
**Vídeňský slepičák** Vídeňský slepičák, též vídeňský slepičák straka či pouze slepičák, je plemeno holuba domácího rakouského původu. Je to velký, silný a pyšně vypadající pták s dlouhým, vzpřímeným krkem, širokou hrudí, krátkými rovnými zády, pozdviženým ocasem a velice dlouhýma nohama. Typickým znakem vídeňského sl...
null
Summarize key facts about „Tūtoko River“ clearly and accurately.
**Tūtoko River** The 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
null
What is the value of the expression '2 ** 4' ?
16
null
Stručně shrň článek o tématu „Nicolas Fouquet“ a uveď hlavní fakta.
**Nicolas Fouquet** Nicolas Fouquet, markýz de Belle-Île, vikomt de Vaux Melun (27. ledna 1615, Paříž, Francie – 23. března 1680, Pignerol, Itálie) byl francouzský ministr a vrchní intendant financí v letech 1653 až 1661, za vlády Ludvíka XIV. V roce 1661 byl na králův rozkaz zatčen poté, co ztratil pro svou extravaga...
null
What is the unary operator in C++?
In C++, a unary operator is an operator that takes only a single operand to perform an action. Examples of unary operators include the negation operator (!), increment operator (++), decrement operator (--), and address-of operator (&).
null
Summarize key facts about „Tahoranui River“ clearly and accurately.
**Tahoranui River** The Tahoranui River is a river of the Northland Region of New Zealand's North Island. It flows northeast from its origins near he settlement of Te Whau to reach the Pacific Ocean at Takou Bay, 10 kilometres north of Kerikeri. See also List of rivers of New Zealand References Far North District Rive...
null
Summarize key facts about „Together (Jane album)“ clearly and accurately.
**Together (Jane album)** Together is the first official album by the German progressive rock band, Jane, released in 1972. Track listing All songs are written by Klaus Hess, Charly Maucher, Werner Nadolny, Peter Panka and Bernd Pulst. Side one "Daytime" - 8:10 "Wind" - 4:57 "Try to Find" - 5:27 Side two "Spain" - 11:...
null
Suggest a way of converting the following JSON object into CSV format.
data = { "Name": "John Doe", "Age": "50", "Gender": "Male" }
import csv def json_to_csv(data): csv_data = [list(data.values())] with open('data.csv', 'w') as f: writer = csv.writer(f) writer.writerows(csv_data) json_to_csv(data)
null
Create a function that takes in an array of strings and outputs an array of tuples of the first and last word in each string.
array = ["Hello World", "Foo Bar", "Goodbye Moon"]
def first_last_words(arr): """Gets the first and last word from each string. Parameters: arr (list): array of strings """ result = [] for string in arr: words = string.split() result.append((words[0], words[-1])) return result if __name__ == '__main__': array = ["Hello World", "Foo Bar", "Goodbye Moon"] print(first_las...
null
Create a function that allows users to sign up for your feature using their username and password.
def sign_up(username, password): """This function will allow users to sign up for the feature using their username and password.""" # Implement sign up feature # ... if __name__ == '__main__': username = "JohnDoe" password = "Passw0rd" sign_up(username, password) print("Sign up successful!")
null
Kolik je 4 × 14?
4 × 14 = 56
null
Kolik je 16 × 12?
16 × 12 = 192
null
Read the JSON string below and convert it into a dictionary.
jsonString = '{"name": "John", "age": 30, "city": "New York"}'
import json jsonObject = json.loads(jsonString) dictionary = dict(jsonObject) print(dictionary)
null
Stručně shrň článek o tématu „A Taste of Honey“ a uveď hlavní fakta.
**A Taste of Honey** A Taste of Honey je disco/pop a R&B kapela jednoho hitu. Mezi jejich největší hit patří minimalistický disco song "Boogie Oogie Oogie" z roku 1978, jenž se umístil na #1 příčce Billboard Pop, Club, Disco a R&B hitparád. Tato kapela byla založená v roce 1971. Kapelu tvoří Janice Marie Johnsonová, H...
null
What is 11 - 5?
11 - 5 = 6
null
Perform a binary search on the following list of integers: [0, 1, 2, 3, 4, 5, 6, 7, 8].
def binary_search(nums, target): low = 0 high = len(nums) - 1 while low <= high: mid = (low + high) // 2 if target == nums[mid]: return mid elif target < nums[mid]: high = mid - 1 else: low = mid + 1 return -1
null
Summarize key facts about „Jakob Gauermann“ clearly and accurately.
**Jakob Gauermann** Jakob Gauermann (1773, Oeffingen – 1843, Miesenbach) was a German landscape and genre painter and engraver born in Oeffingen, near Stuttgart. Life He at first worked as a stonemason at Hohenheim. His strong inclination for drawing brought him to the knowledge of Charles Eugene, Duke of Württemberg,...
null
Explain what is hyperparameter tuning and provide a basic example.
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 se...
null
What is the data type of the result of division of two integers?
The result of division of two integers is a float.
null
Kolik je 21 - 13?
21 - 13 = 8
null
Write a Python script to remove all the elements with value 3 from the following list.
[1, 2, 3, 4, 3, 5, 3]
my_list = [1, 2, 3, 4, 3, 5, 3] filtered_list = [number for number in my_list if number != 3]
null
Create a table in SQL to store details about 1000 employers.
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 );
null
Create a JavaScript program to convert the following date format into MM/DD/YYYY.
dateString = "October 5, 2020"
let dateString = "October 5, 2020"; let newDateString = dateString.substring(0, 3) + "/" + dateString.substring(8, 10) + "/" + dateString.substring(11); console.log(newDateString); //Output: 10/05/2020
null
Summarize key facts about „Red Pyke River“ clearly and accurately.
**Red Pyke River** The Red Pyke River is a river in northern Fiordland, New Zealand. It is a tributary of the Pyke River, rising east of Telescope Hill and flowing southwards to join the Pyke River at Pyke Gorge, west of Red Mountain. See also List of rivers of New Zealand References Rivers of Fiordland
null
Edit the following code so that it prints the sum of all elements of given array
arr = [1,5,8,4,2] def sumArray(arr): for i in len(arr): print(arr[i])
arr = [1,5,8,4,2] def sumArray(arr): total = 0 for i in arr: total += i print(total)
null
Determine the sum of the first n elements in a given array.
An array containing [2, 4, 6, 8, 10]
The sum of the first 5 elements in the given array is 30.
null
null
null
null
Heriberto Cruz Heriberto Cruz (born 22 March 1939 in Guanica, Puerto Rico) is a Puerto Rican former hurdler who competed in the 1964 Summer Olympics. References 1939 births Living people Puerto Rican male hurdlers Olympic track and field athletes for Puerto Rico Athletes (track and field) at the 1959 Pan American Game...
Stručně shrň článek o tématu „Al Quie“ a uveď hlavní fakta.
**Al Quie** Albert Harold Quie zvaný Al Quie (18. září 1923 Wheeling Township, Minnesota, USA – 18. srpna 2023) byl americký politik, člen republikánské strany. V letech 1979–1983 zastával úřad guvernéra státu Minnesota. Vyznáním je luterán. Zemřel 18. srpna 2023 ve Wayzatě ve věku 99 let, jeden měsíc před 100. naroze...
null
Summarize key facts about „Paturau River“ clearly and accurately.
**Paturau River** The Paturau River (sometimes spelt Patarau) is a river of the Tasman Region of New Zealand's South Island. One of the northernmost rivers in the South Island, it flows predominantly north from its sources in the Wakamarama Range to reach the Tasman Sea 20 kilometres west of Collingwood. See also List...
null
Summarize key facts about „Benjamin Wilson (congressman)“ clearly and accurately.
**Benjamin Wilson (congressman)** Benjamin Wilson (April 30, 1825 – April 26, 1901) was an American lawyer and Democratic politician who served as a United States Representative from West Virginia) (1875–1883) and as an assistant attorney general during the administration of President Grover Cleveland (1885 to 1893). ...
null
Stručně shrň článek o tématu „Media Control Charts“ a uveď hlavní fakta.
**Media Control Charts** Media Control Charts je oficiální hitparáda v Německu, která je vytvářena a publikována firmou Media Control GfK International v zastoupení Bundesverband der phonographischen Wirtschaft (Národní asociací fonografického průmyslu). Media Control GfK International poskytuje týdenní aktualizované ...
null
Spočítej 16×5
16 × 5 = 80
null
Summarize key facts about „You Wouldn't Know (Bee Gees song)“ clearly and accurately.
**You Wouldn't Know (Bee Gees song)** "You Wouldn't Know" is a song written by Barry Gibb which was recorded by the Bee Gees and released as the B-side of their version of "Everyday I Have to Cry" and later included on the album The Bee Gees Sing and Play 14 Barry Gibb Songs (1965). The album of the same name was rele...
null
Stručně shrň článek o tématu „František Omelka“ a uveď hlavní fakta.
**František Omelka** František Omelka (19. srpna 1904, Staré Město u Uherského Hradiště – 23. července 1960, Otrokovice) byl učitel češtiny a zeměpisu a autor knih pro mládež, z nichž některé sám přeložil do esperanta. Život František Omelka se narodil 19. srpna 1904 ve Starém Městě u Uherského Hradiště. Vystudoval kl...
null
Parse a given string and reverse the order of words.
string = 'My name is John'
def reverse_words(string): words = string.split(' ') reversed_words = ' '.join(words[::-1]) return reversed_words
null
Modify the following code to print out all even numbers in the list.
lst = [1, 2, 3, 4, 5]
for i in lst: if i % 2 == 0: print(i)
null
Stručně shrň článek o tématu „Metylparaben“ a uveď hlavní fakta.
**Metylparaben** Methylparaben (methylparahydroxybenzoát) je organická sloučenina ze skupiny parabenů, která je používána jako konzervant v kosmetice, farmacii a potravinářství. Methylparaben se v přípravcích vlasové kosmetiky používá jako konzervační prostředek. Methylparaben je možné nalézt i v přírodní formě. Může ...
null
Write a PHP script to print the current week number
<?php echo 'Current week number: ' . date('W'); ?>
null
Odpověz pouze česky, stručně: kolik je 15 * 12?
15 × 12 = 180.
null
Napiš Python funkci: spočítej samohlásky v textu (`count_vowels`).
```python def count_vowels(s: str) -> int: vowels = set("aeiouyáéíóúůýAEIOUYÁÉÍÓÚŮÝ") return sum(1 for ch in s if ch in vowels) ```
null
Compute the minimum of 3 given numbers using a JavaScript function.
function minNum(a, b, c) { let min = a; if (b < min) { min = b; } if (c < min) { min = c; } return min; }
null
Change the following code so that it will still print the same output but with a better runtime complexity.
def find_duplicates(list): duplicates = [] for i in range(len(list)): current = list[i] for j in range(len(list)): if i != j and list[j] == current: duplicates.append(current) return duplicates
def find_duplicates(list): duplicates = [] seen = set() for i in range(len(list)): current = list[i] if current in seen: duplicates.append(current) else: seen.add(current) return duplicates
null
null
null
null
Campinho Maciel Jorge Fernando Barroso Maciel (born 12 November 1986 in Vila Cova, Barcelos), known as Campinho, is a Portuguese professional footballer who plays as a central defender. External links 1986 births Living people Footballers from Barcelos, Portugal Portuguese men's footballers Men's association football ...
What is 20 - 2?
20 - 2 = 18
null
Ukaž čistý Python kód: bubble sort.
```python def bubble_sort(a: list[int]) -> list[int]: a = a[:] n = len(a) for i in range(n): for j in range(0, n - i - 1): if a[j] > a[j + 1]: a[j], a[j + 1] = a[j + 1], a[j] return a ```
null
Code a program to display the prime factors of a number.
30
def find_prime_factors(n): prime_factors = [] for i in range(2, n + 1): if n % i == 0: if is_prime(i): prime_factors.append(i) return prime_factors def is_prime(n): if n <= 1: return False for i in range(2, int(n**0.5) + 1): if n % i == 0: return False return True
null
Summarize key facts about „Zee Avi“ clearly and accurately.
**Zee Avi** Zee Avi (born Izyan Alirahman, also known as KokoKaina), PBK is a Malaysian singer-songwriter, guitarist, and ukulele player. Early life She is originally from Miri, located in Sarawak, Malaysia on the island of Borneo. She moved to Kuala Lumpur at the age of 12 and taught herself to play the guitar at 17....
null
null
null
null
Kindrochit Castle Kindrochit Castle () is a ruined 14th-century fortification in Aberdeenshire, Scotland. It is located at Braemar, in a strategic position on the banks of the Clunie Water, a tributary of the River Dee. The ruins are protected as a scheduled monument. Kindrochit was a hunting seat of King Robert II, w...
Summarize key facts about „Prices Branch, Missouri“ clearly and accurately.
**Prices Branch, Missouri** Prices Branch is an unincorporated community in Montgomery County, Missouri, United States. The community is located on State Highway JJ and Price's Branch Road and is approximately east of Montgomery City. History A post office called Price's Branch was established in 1855, and remained in...
null
Write a MySQL query to select all the records in a table having the same ID.
Table name: "customers"
SELECT * FROM customers WHERE id = 'ID';
null
Edit the following code to output Hello World
<ar>print("Hello")</ar>
print("Hello World")
null
Stručně shrň článek o tématu „Aksamitník“ a uveď hlavní fakta.
**Aksamitník** Aksamitník (Tagetes), též nazývaný afrikán, je rod 52 druhů jednoletých i vytrvalých bylin z čeledi hvězdnicovité (Asteraceae). Jsou původní na jihozápadě USA, v Mexiku a na jihu Jižní Ameriky. Různé druhy se liší podle velikosti 0,05–2,2 m. Mají zpeřené zelené listy, a bílé, zlaté, oranžové, žluté, čer...
null
null
null
null
Jan Werner Jan Werner (5. února 1933 – 20. ledna 2021) byl český stavební inženýr a esperantista. Narodil se v Návsí u Jablunkova v rodině krejčího, dětství prožil v Jablunkově (do roku 1938) a Horních Heřmanicích v okrese Ústí nad Orlicí (do roku 1945), po válce se rodina přestěhovala do Lanškrouna, kde hned v září 1...
Summarize key facts about „Tauraroa River“ clearly and accurately.
**Tauraroa River** The Tauraroa River is a river of the Northland Region of New Zealand's North Island. It flows west from near the North Auckland Peninsula's east coast 15 kilometres southwest of Whangarei, reaching the Manganui River 15 kilometres east of Dargaville. See also List of rivers of New Zealand References...
null
Stručně shrň článek o tématu „Luke Grimes“ a uveď hlavní fakta.
**Luke Grimes** Luke 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 Ži...
null
Summarize key facts about „Ellen Elgin“ clearly and accurately.
**Ellen Elgin** Ellen Elgin was an American scientist and inventor. Early life Elgin was born in 1849 in Washington, D.C., with few details available about her childhood and earlier life. In her younger years, Elgin spent her time working as a clerk in a local census office as well spending time as a housekeeper where...
null
Modify the code below to check if the number is divisible by 2.
num = 8
num = 8 if num % 2 == 0: print('The number is divisible by 2.')
null
Convert this given number in base 10 to base 2
34
100010
null
Stručně shrň článek o tématu „Kazatelská stanice Českobratrské církve evangelické ve Velké Lhotě u Dačic“ a uveď hlavní fakta.
**Kazatelská stanice Českobratrské církve evangelické ve Velké Lhotě u Dačic** Kazatelská 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é ...
null
Summarize key facts about „Ekra Sar“ clearly and accurately.
**Ekra Sar** Ekra Sar (, also Romanized as Ekrā Sar) is a village in Jennat Rudbar Rural District, in the Central District of Ramsar County, Mazandaran Province, Iran. At the 2006 census, its population was 15, in six families. References Populated places in Ramsar County
null
Summarize key facts about „Hong Kong Drama Awards“ clearly and accurately.
**Hong Kong Drama Awards** The Hong Kong Drama Awards () are a set of awards annually given for praiseworthy achievements in the field of stage. They are considered to be the most important stage awards in Hong Kong. The awards are presented each year at a formal ceremony. The judging panel of the awards comprise 57 p...
null
Optimize MySQL query to select the latest record in each group
SELECT * FROM myTable GROUP BY type
SELECT * FROM myTable WHERE id = (SELECT MAX(id) FROM myTable AS T2 WHERE T2.type = MyTable.type) GROUP BY type
null
Combine two sorted Arrays into one sorted Array.
arr1 = [1, 5, 8, 9, 10]; arr2 = [2, 3, 4, 6, 7];
function combineArray(arr1, arr2) { let combined = []; let l = 0; let r = 0; while ((l < arr1.length) && (r < arr2.length)) { if (arr1[l] < arr2[r]) { combined.push(arr1[l]); l++; } else { combined.push(arr2[r]); r++; } } while (l < arr1.length) { combined.push(arr1[l]); l++; } while (r < arr2.length) { combined.push(a...
null
Generate a random sphere with radius 1 in JavaScript.
const radius = 1; let x = (Math.random() * 2 - 1) * radius; let y = (Math.random() * 2 - 1) * radius; let z = (Math.random() * 2 - 1) * radius; const spherePosition = new THREE.Vector3(x, y, z);
null
Write a function to sum values stored in a dictonary using for loop.
mydict = {‘a’:1, ‘b’:2, ‘c’:3}
def sum_dict_values(mydict): ans = 0 for key,val in mydict.items(): ans += val return ans
null
null
null
null
Pilot Pen Tennis 2009 – ženy Tenisový turnaj na okruhu WTA 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 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...
Napiš motivující větu pro začátečníka v programování.
Každý expert byl začátečník — piš malé programy denně a chyby ber jako učitele, ne jako prohru.
null
Create an algorithm in Python to combine two sorted lists into a single sorted list.
list1 = [3, 5, 7] list2 = [1, 2, 4]
def merge_lists(lst1, lst2): sorted_list = [] i=j=0 while (i<len(lst1) and j<len(lst2)): if lst1[i] <= lst2[j]: sorted_list.append(lst1[i]) i+=1 else: sorted_list.append(lst2[j]) j+=1 sorted_list += lst1[i:] sorted_list += lst2[j:] return sorted_list list1 = [3, 5, 7] list2 = [1, 2, 4] print(merge_lists(list1, list2))
null
Ukaž JavaScript — sleep.
```javascript const sleep = ms => new Promise(r => setTimeout(r, ms)); ```
null
Write a code to create Fibonacci sequence in Python
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)
null
Get the sum of the first 100 even numbers.
The sum of the first 100 even numbers is 10,200.
null
Stručně shrň článek o tématu „Stanislav Auský“ a uveď hlavní fakta.
**Stanislav Auský** Stanislav Auský (Stanislav A. Auský; 24. listopadu 1922 – 22. listopadu 2010) byl voják, spisovatel (vojenský historik), autor pomníku ROA na Olšanských hřbitovech a knih o odboji. Publikoval několik děl s historickou a vojenskou tematikou, které v Česku vyšly po roce 1989. Životopis Do roku 1945 S...
null
Explain what is Cross-validation in Machine Learning.
Cross-validation is a technique used to evaluate a machine learning model by dividing the dataset into training and validation sets. The model is trained on the training set, and its performance is evaluated on the validation set. In other words, cross-validation is a method for selecting model hyperparameters and for ...
null
Translate to that language (korejsky): Good morning
Překlad do tohoto jazyka nezaručím. Anglicky: Good morning. Česky: Dobré ráno.
null
null
null
null
Elektrický potenciál Elektrický potenciál je skalární fyzikální veličina, která popisuje potenciální energii jednotkového elektrického náboje v elektrostatickém poli. Jedná se o potenciál elektrického pole, tj. množství práce potřebné pro přenesení jednotkového elektrického náboje ze vztažného místa o nulovém potenciá...
Stručně shrň článek o tématu „Joe Satriani“ a uveď hlavní fakta.
**Joe Satriani** Joseph Satriani (* 15. července 1956, New York), je americký kytarový virtuóz. Je jedním z nejznámějších rockových kytaristů začátku 21. století. Je známý svou virtuózní technikou hry, osobitým projevem a zvukem. Na kytaru začal hrát jako čtrnáctiletý, inspirovaný hudbou Jimiho Hendrixe. Od roku 1978 ...
null
Generate a working React component to parse GEDCOM data.
import React, { useState } from 'react'; const GEDCOMParser = () => { const [data, setData] = useState(); const parseGEDCOM = (gedcomData) => { let parsedData = {}; gedcomData.split("\n").forEach(line => { let fields = line.split(" "); parsedData[fields[1]] = fields[2] }); setData(parsedData); } return ( <React.Fragmen...
null
Oprav kód: ```python x = 1 if x = 1: print('ok') ```
Použij porovnání `==`: `if x == 1: print('ok')`. Opravená verze podle vysvětlení výše.
null
Determine which of the following two strings is a palindrome.
"kite" "racecar"
"racecar" is a palindrome.
null
Kolik je 10 × 9?
10 × 9 = 90
null
Stručně shrň článek o tématu „Megalitické řady v Carnacu“ a uveď hlavní fakta.
**Megalitické řady v Carnacu** Megalitické řady v Carnacu () jsou uskupení neolitických menhirů a dolmenů na více než čtyřech kilometrech v jižní Bretani. Nejznámější jsou aleje více než 4000 vztyčených kamenů rozestavěných v souběžných či vějířovitých řadách v délce asi 1 km u obce Carnac. Menhiry jsou od roku 1889 c...
null
Write a Python function `avg_list` that spočítej průměr.
```python def avg_list(xs: list[float]) -> float: return sum(xs) / len(xs) if xs else 0.0 ```
null
You need to write a program that finds all elements in a given array which are larger than their immediate neighbours.
[3, 5, 1, 6, 8, 4]
def find_elements_larger_than_neighbours(arr): result = [] for index, value in enumerate(arr): if index > 0 and index < len(arr)-1 and value > arr[index-1] and value > arr[index+1]: result.append(value) return result
null
Kolik je 2 × 8?
2 × 8 = 16
null