instruction
stringlengths
2
259
⌀
input
stringlengths
0
442
⌀
output
stringlengths
1
1.9k
⌀
text
stringlengths
273
2.08k
⌀
Summarize key facts about „Johnny Hector“ clearly and accurately.
**Johnny Hector** Johnny Lyndell Hector (born November 26, 1960) is a former professional American football player who was selected by the New York Jets in the second round of the 1983 NFL Draft. A , 200 lbs. running back from Texas A&M, Hector played 10 NFL seasons for the New York Jets from 1983 to 1992. Hector's be...
null
Write a JavaScript statement to check if a given number is greater than 5.
// given number let number = 5; if (number > 5) { console.log('Number is greater than 5'); }
null
Count the number of lines of code in the following code snippet.
def add(num1, num2): return num1 + num2
3
null
Create a function in Python that will return the maximum difference between any two numbers present in an array.
def max_difference(arr): difference = 0 for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[j] - arr[i] > difference: difference = arr[j] - arr[i] return difference
null
null
null
null
Australian New Zealanders Australian New Zealanders () refers to New Zealanders whose origins are in Australia, as well as Australian migrants and expatriates based in New Zealand. History & Relationship New Zealand and Australia were both colonised by Britain and remain under the commonwealth. New Zealand was origina...
Write a function to display a temperature in Celsius with the corresponding temperature in Fahrenheit.
def show_temperature(temp): fahrenheit = (temp * 9/5) + 32 return '{} degrees Celsius corresponds to {} degrees Fahrenheit'.format(temp, round(fahrenheit, 1))
null
null
null
null
Rhododendron subg. Pentanthera Rhododendron subgenus Pentanthera was a subgenus of the genus Rhododendron. The common name azalea is applied to many of the species, and also to species in some other subgenera. In 2005 it was discontinued and its four sections moved or dismembered. The subgenus included four sections: ...
Construct a program to parse a JSON array.
[{"name":"John", "age":30},{"name":"Alice", "age":25}]
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}')
null
Summarize key facts about „Yale Boss“ clearly and accurately.
**Yale Boss** Yale Boss (October 18, 1899 – November 16, 1977) was an American child actor of the silent screen. Biography New York-born Boss was one of the screen's first child stars. He was already a stage veteran when he made his screen debut in Thanhouser's The Actor's Children (1910). He appeared on Broadway oppo...
null
Write a JavaScript program to find all the words in a string which start with a specific letter.
string: “The quick brown fox jumps over the lazy dog” letter: ‘j’
function findWords(string, letter){ let words = string.split(" "); let result = []; for(let word of words){ if(word.charAt(0) == letter){ result.push(word); } } return result; } console.log(findWords("The quick brown fox jumps over the lazy dog", "j")); # Output: ["jumps"]
null
null
null
null
Tibor Sekelj Tibor Sekelj, původně maďarsky Székely Tibor (14. února 1912 ve Spišské Sobotě v Rakousku-Uhersku – 20. září 1988 v Subotici v Jugoslávii, dnes Srbsko) byl jugoslávsko-chorvatský novinář, badatel, spisovatel, právník a esperantista. Zúčastnil se velkých výprav Jižní Amerikou, Afrikou a Asií. Jedna z amazo...
null
null
null
WRAY (AM) WRAY (1250 AM) is a radio station licensed to Princeton, Indiana, United States, the station serves the Evansville area. The station is currently owned by Princeton Broadcasting Co. AM and FM studios and transmitters are at 1900 West Broadway, in Princeton. References External links RAY (AM) News and talk ra...
Stručně shrň článek o tématu „Český bublák“ a uveď hlavní fakta.
**Český bublák** Český bublák je plemeno holuba domácího vzniklé na území České republiky. Je to středně velký holub s výraznými péřovými ozdobami, peří na čele se stáčí dopředu a překrývá ozobí, v týlu vyrůstá chocholka a ptáci mají nohy opeřené hustým dlouhým rousem. Kromě vzhledu je pro něj typický hlasový projev, ...
null
Construct a C++ code snippet to output a Fibonacci sequence with a given number of elements
7
#include <iostream> using namespace std; int Fibonacci(int n) { if (n <= 1) return n; return Fibonacci(n - 1) + Fibonacci(n - 2); } int main () { int n; cout<<"Enter the number of elements: "; cin>>n; cout << "Fibonacci sequence: "; for (int i = 0; i < n; i++) cout << Fibonacci(i) <<" "; return 0; } ;
null
Write a Python function that accepts a list and returns the sum of the numbers present in the list.
list = [1, 2, 3, 4, 5]
def list_sum(lst): result = 0 for num in lst: result += num return result
null
Write a JavaScript function to retrieve all users from an API endpoint.
function getUsers() { fetch('https://example.com/users') .then(function(response) { response.json().then(function(data) { console.log(data); }); }); }
null
Ukaž Python kód — is palindrome.
```python def is_palindrome(s): t = ''.join(c.lower() for c in s if c.isalnum()) return t == t[::-1] ```
null
Stručně shrň článek o tématu „Sním jiným jazykem“ a uveď hlavní fakta.
**Sním jiným jazykem** Sním jiným jazykem (v originále Sueño en otro idioma) je mexický hraný film z roku 2017, který režíroval Ernesto Contreras. Snímek měl světovou premiéru na filmovém festivalu Sundance 23. ledna 2017. V ČR byl uveden v roce 2018 na filmovém festivalu Febiofest. Děj Martín je mladý lingvista, kter...
null
Get a user input and check if the input is a palindrome.
def is_palindrome(user_input): rev_input = user_input[::-1] if (rev_input == user_input): return True else: return False
null
Summarize key facts about „Commons Registration Act 1965“ clearly and accurately.
**Commons Registration Act 1965** The Commons Registration Act 1965 is an Act of Parliament in the United Kingdom enacted in 1965 that concerns the registration of rights to common land, town greens, and village greens in England and Wales. The legislation under the Harold Wilson government made reference to the Land ...
null
How can you write a JavaScript regular expression to validate an email address?
var re = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
null
Write a C++ code to find the greatest common divisor of two integers
#include<iostream> using namespace std; int gcd(int first, int second) { // Base case if (second == 0) return first; return gcd(second, first % second); } int main() { // Define two integers int first = 10; int second = 20; cout << "The greatest common divisor of " << first << " and " << second << " is " << gcd(first, ...
null
Write a function in Python to print out the most common words in a given text.
This is a test text. It can be used to test a function for the most common words.
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)
null
Summarize key facts about „Tuilagi“ clearly and accurately.
**Tuilagi** Tuilagi is a surname notably shared by a set of Samoan rugby-playing brothers. The five oldest have all represented at international level in a World Cup while the youngest, Manu chose to represent , also reaching a World Cup and playing for the British and Irish Lions in 2013. Freddie Tuilagi (born 1971) ...
null
Summarize key facts about „Slavko Vučković“ clearly and accurately.
**Slavko Vučković** Slavko Vučković (Serbian Cyrillic: Cлaвкo Bучкoвић, born 5 August 1982) is a Serbian footballer who plays for Ararat Yerevan. External sources Profile at Armenian Federation site. Profile at FootballWorldsgame. 1982 births Living people Serbian men's footballers Serbian expatriate men's footballers...
null
Write a function to decode a string encoded using Base64.
encoded_s = "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2ljaW5nIGVsaXQsIHNlZCBkbyBlaXVzbW9kIHRlbXBvciBpbmNpZGlkdW50IHV0IGxhYm9yZSBldCBkb2xvcmUgdGluY2lkdXJlIGV4c2VlIGRlc2VydW50IG1vbGxpdCBhbmltIGlwc3VtIHRlbXBvcmUgYSBjb25zZXF1YXQgcXVpcyBkb2xvcmVtIG5pc2ku
import base64 def decode_base64(encoded_s): decoded_s = base64.b64decode(encoded_s).decode('utf-8') return decoded_s
null
Implementuj v Pythonu clamp value.
```python def clamp(x, lo, hi): return max(lo, min(hi, x)) ```
null
null
null
null
Zdeněk Liška Zdeněk Liška (16. března 1922 Libušín<ref>Procházka Petr (2015). Mistr kontrastů Zdeněk Liška. https://www.magazinuni.cz/hudba/mistr-kontrastu-zdenek-liska/</ref> – 13. července 1983 Praha) byl český hudební skladatel, který se věnoval především filmové hudbě. Biografie a tvorba Pocházel z muzikantské rod...
Compare the two strings and find out which one comes first alphabetically.
String1: apple String2: banana
apple comes first alphabetically.
null
Dobrý den tam?
Ahoj! Jsem tu pro kód, vysvětlení i češtinu.
null
null
null
null
Jaroslav Eduard Dvořák Jaroslav Eduard Dvořák (* 5. června 1946 Koloděje) je český malíř a sochař, vysokoškolský pedagog, zakládající člen Volného seskupení 12/15 Pozdě, ale přece. Život Jaroslav Dvořák absolvoval Střední výtvarnou školu v Praze (1960-1964). V letech 1966-1972 studoval na Akademii výtvarných umění v P...
Zdravím
Ahoj! Jak ti můžu pomoct?
null
Co je IDE? (stručně)
IDE je vývojové prostředí s editorem, debuggerem a nástroji (VS Code, PyCharm).
null
Construct a SQL query to find all customers with a first name of "John" and a city of "New York".
SELECT * from customers WHERE first_name = 'John' AND city = 'New York';
null
Create a program which takes a given list and returns a list with only the unique elements.
[3, 5, 7, 9, 5, 3, 7]
my_list = [3, 5, 7, 9, 5, 3, 7] unique_list = list(set(my_list)) print(unique_list) #Output: [3, 5, 7, 9]
null
Kolik je 4 × 13?
4 × 13 = 52
null
Summarize key facts about „Oostakker“ clearly and accurately.
**Oostakker** Oostakker (), formerly spelled Oostacker, is one of the smaller former municipalities which were merged into Ghent (from which it is only two miles), the capital of the Belgian province of East Flanders. The hamlet is mainly known for the Shrine of Oostakker, a Roman Catholic shrine of the Virgin Mary. R...
null
Summarize key facts about „List of hospitals in Louisiana“ clearly and accurately.
**List of hospitals in Louisiana** This is a list of hospitals in the state of Louisiana. See also List of medical schools in the United States. Caddo Parish and Bossier Parishes Brentwood Hospital - Shreveport, Louisiana Christus Bossier Emergency Hospital - Bossier City, Louisiana Christus Highland Medical Center - ...
null
Summarize key facts about „The Cadets (TV series)“ clearly and accurately.
**The Cadets (TV series)** The Cadets () is a 2004 Russian TV series about a class of Soviet artillery officer cadets going through training prior to their commissioning and entry into the Battle of Stalingrad during World War II (The Great Patriotic War). The ten parts series are based on the memoirs of Pyotr Todorov...
null
null
null
null
Felinoterapie Felinoterapie patří podobně jako canisterapie mezi zooterapie, resp. zoorehabilitace. Jedná se o podpůrnou léčbu somatických i psychických poruch či aktivizační metodu. Jejím principem je přímý kontakt pacienta (klienta) s kočkou. V anglosaských a dalších zemích není běžné oddělování jednotlivých druhů t...
Kolik je 14 - 4?
14 - 4 = 10
null
Stručně shrň článek o tématu „Hurtigruten“ a uveď hlavní fakta.
**Hurtigruten** Hurtigruten (v českém překladu Rychlá cesta, v angličtině někdy nazýván Norwegian Coastal Express) je označení pro systém rozvozu pošty loděmi podél dva tisíce sedm set kilometrů dlouhého západního norského pobřeží, který byl spuštěn v roce 1893. V současnosti jsou lodě Hurtigrutenu plující mezi městy ...
null
Create an expression tree for the expression (2+3)*4.
* / \ + 4 / \ 2 3
null
Stručně shrň článek o tématu „Hans Getzinger“ a uveď hlavní fakta.
**Hans Getzinger** Hans 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...
null
Summarize key facts about „Thomas Cartwright (politician)“ clearly and accurately.
**Thomas Cartwright (politician)** Thomas Cartwright (1671–1748), of Aynho Park, Northamptonshire was an English landowner and Tory politician, who sat in the English and British House of Commons between 1695 and 1748. As the longest serving Member he eventually became Father of the House. Early life Cartwright was th...
null
Stručně shrň článek o tématu „Ileana Silaiová“ a uveď hlavní fakta.
**Ileana Silaiová** Ileana 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...
null
null
null
null
1937 Madras Presidency Legislative Assembly election The first legislative assembly election for the Madras Presidency was held in February 1937, as part of the nationwide provincial elections in British India. The Indian National Congress obtained a majority by winning 159 of 215 seats in the Legislative Assembly. Th...
Summarize key facts about „Calum MacLeod (of Raasay)“ clearly and accurately.
**Calum MacLeod (of Raasay)** Malcolm Macleod (Scottish Gaelic: Calum Macleòid), BEM (15 November 1911 – 26 January 1988) was a crofter who notably built Calum's Road on the Island of Raasay, Scotland. He was Local Assistant Keeper of Rona Lighthouse and the part-time postman for the north end of Raasay. Early life Ca...
null
Design an algorithm for finding the nth node from the tail of a linked list.
""" def nthFromLast(head, n): # Initialize slow and fast pointers slow = head fast = head # Move fast pointer n-1 times while (n > 0): if (fast == None): return None fast = fast.next n = n - 1 # Move both slow and fast pointer together while (fast.next != None): slow = slow.next fast = fast.next return slow """
null
Create a Java 8 Stream to filter a list of objects by a given field.
[ {'name': 'John', 'age': 20}, {'name': 'Smith', 'age': 30}, {'name': 'Bill', 'age': 40} ]
List<Object> list = Arrays.asList({ {'name': 'John', 'age': 20}, {'name': 'Smith', 'age': 30}, {'name': 'Bill', 'age': 40} }); Stream<Object> stream = list.stream(); // Filter records whose age greater than 25 stream.filter(record -> (int) record.get("age") > 25).forEach(System.out::println);
null
Summarize key facts about „Kerva, Mazandaran“ clearly and accurately.
**Kerva, Mazandaran** Kerva (, also Romanized as Kervā; also known as Bālā Gervā-ye ‘Olyā, Bālā Karvā, and Bālā Kervā) is a village in Nowkand Kola Rural District, in the Central District of Qaem Shahr County, Mazandaran Province, Iran. At the 2006 census, its population was 503, in 137 families. References Populated ...
null
Stručně shrň článek o tématu „Funk rock“ a uveď hlavní fakta.
**Funk rock** Funk rock je hudební žánr, který fúzuje rockovou hudbu a funkové elementy. Tento žánr začal v šedesátých letech u umělců jako například The Jimi Hendrix Experience, War, Funkadelic, Edwin Star, The Temptations či Mother's Finest. Experimence Někteří hudebníci s funk-rockem jenom experimentovali. Mezi tak...
null
null
null
null
Lenka Machoninová Lenka Foletti Machoninová (* 11. července 1951 v Praze) je česká herečka. Život Narodila se v rodině divadelníka a překladatele Sergeje Machonina. V roce 1972 vystudovala herectví na Divadelní fakultě Akademie múzických umění. První angažmá získkala v Jihočeském divadle v Českých Budějovicích. Od rok...
Spočítej: 19 + 2 = ?
19 + 2 = 21
null
Kolik je 12 × 10?
12 × 10 = 120
null
Create a program to accept a string and display its length.
def getLength(string): length = len(string) return length result = getLength("GPT") print(result)
null
Summarize key facts about „Waipati River“ clearly and accurately.
**Waipati River** The Waipati River, alternatively known as the Chaslands River is a river in the eastern Catlins, New Zealand. It rises in the Maclennan Range and flows south-eastward into the Waipati Beach north of Chaslands Mistake. See also List of rivers of New Zealand References New Zealand 1:50000 Topographic M...
null
What HTML code is needed to print each item in the following list?
list = ["apple", "banana", "cherry"]
<ul> <li>apple</li> <li>banana</li> <li>cherry</li> </ul>
null
Summarize key facts about „Tīmaru River“ clearly and accurately.
**Tīmaru River** The Tīmaru River is a river of the Otago region of New Zealand's South Island. It initially flows southwest before turning west to flow into the eastern shore of Lake Hāwea, northeast of Lake Hāwea township. See also List of rivers of New Zealand References Rivers of Otago Rivers of New Zealand
null
Summarize key facts about „John Edward Jones (Welsh politician)“ clearly and accurately.
**John Edward Jones (Welsh politician)** John Edward Jones (10 December 1905 – 30 May 1970), known as J. E. Jones, was a Welsh political organiser. Born in Melin-y-Wîg near Corwen in Denbighshire, Jones studied at Bala Grammar School and the University College of Wales, Bangor. There, he was elected leader of the Stud...
null
Stručně shrň článek o tématu „Čchö Če-u“ a uveď hlavní fakta.
**Čchö Če-u** Čchö Če-u (, 18. prosince 1824 Kjongdžu – 15. dubna 1864 Tegu) byl korejský náboženský vůdce. V rámci kritiky zahraničních kulturních vlivů a kritiky nedostatků ve vládě dynastie Čoson založil v roce 1860 náboženské hnutí Tonghak. Protože hnutí hlásalo demokracii a vedlo k rolnickým povstáním, byl koncem...
null
Stručně shrň článek o tématu „Svatý Jan pod Skalou“ a uveď hlavní fakta.
**Svatý Jan pod Skalou** Svatý Jan pod Skalou ( je obec ve Středočeském kraji, okrese Beroun, asi 30 km JZ od Prahy a necelých 5 km východně od Berouna. Leží v srdci Chráněné krajinné oblasti Český kras a společně s Karlštejnem a starodávným Tetínem patří mezi nejzajímavější turistické lokality okresu. Žije zde obyvat...
null
Stručně shrň článek o tématu „Postneodarwinismus“ a uveď hlavní fakta.
**Postneodarwinismus** Postneodarwinismus je souhrnné označení pro současné hlavní paradigma evoluční teorie vzešlé z Darwinova učení. Vychází z neodarwinismu, tj. dřívější spojení darwinismu, Mendelovy genetické teorie a populační genetiky, avšak užívá genocentrický pohled na evoluci, jak byl popsán v pracích William...
null
Umíš německy / francouzsky / španělsky / polsky / ruštinu? Buď upřímný.
Ne na úrovni, se kterou by ses mohl spolehnout. Komunikuju česky a anglicky. Ostatní jazyky radši nepřekládám, abych nepletl.
null
null
null
null
Gérson Gérson de Oliveira Nunes (* 11. ledna 1941 v Niterói) je bývalý brazilský fotbalista. Pochází z fotbalové rodiny, začínal v klubu Canto do Rio FC v rodném Niterói, v roce 1959 přestoupil do Flamenga. Reprezentoval Brazílii na Panamerických hrách 1959, olympiádě 1960, mistrovství světa ve fotbale 1966 a mistrovs...
Generate a gradient descent algorithm to optimize a cost function.
def gradient_descent(cost_function, theta, eta, tolerance): cost = cost_function(theta) diff = tolerance + 1 while diff > tolerance: theta_updated = theta for i in range(len(theta)): theta[i] = theta[i] - eta * cost_function.gradient_wrt_theta(theta, i) diff = sum((theta_updated[i] - theta[i])**2 for i in range(len(the...
null
Given two sorted arrays, find elements that exist in both arrays.
arr1 = [1, 2, 5, 8, 9, 10] arr2 = [2, 5, 6, 9]
common_elements = [2, 5, 9]
null
Write code in Java to calculate the minimum number of coins needed to make change for a given amount.
Coin denominations: [1, 5, 10, 25] Amount: 27
public int calculateCoins(int amount, int[] array){ int coinsNeeded = 0; for (int i = array.length - 1; i >= 0; i--){ // Find the largest denomination // which is smaller than amount while (amount >= array[i]){ amount = amount - array[i]; coinsNeeded++; } } return coinsNeeded; }
null
null
null
null
Hapalaraea Hapalaraea is a genus of beetles belonging to the family Staphylinidae. The species of this genus are found in Europe and Northern America. Species: Hapalaraea alutacea (Reitter, 1909) Hapalaraea hamata (Fauvel, 1878) References Staphylinidae Staphylinidae genera
Hey tam?
Ahoj! Jak ti můžu pomoct?
null
Stručně shrň článek o tématu „Zvěstování Panny Marie“ a uveď hlavní fakta.
**Zvěstování Panny Marie** Tradičně Zvěstování Panny Marie, v současné češtině vlastně Zvěstování Panně Marii či christologicky Zvěstování Páně, je biblická událost zaznamenaná v Lukášově evangeliu, kdy se Marii zjevil archanděl Gabriel a oznámil jí, že počne dítě z Ducha svatého a narodí se jí Syn Boží, kterému má dá...
null
Summarize key facts about „Zabadak (band)“ clearly and accurately.
**Zabadak (band)** is a Japanese musical group formed by Tomohiko Kira, Yoko Ueno, and Katushi Matsuda in 1985. The sound of Zabadak has been strongly influenced by both Celtic music and progressive. In 1993, Ueno and Matsuda left and Kira continued the group as a solo act still under the name Zabadak. Kira's partner ...
null
Summarize key facts about „Yang Guohai“ clearly and accurately.
**Yang Guohai** Yang Guohai (; born May 1950) is a retired lieutenant general (zhong jiang) of China's People's Liberation Army Air Force (PLAAF), who served as Chief of Staff of the PLAAF from 2007 to 2013. Biography Yang Guohai was born in May 1950 in Tianjin. He became commander of the PLAAF 4th Fighter Division in...
null
Summarize key facts about „Niger '66: A Peace Corps Diary“ clearly and accurately.
**Niger '66: A Peace Corps Diary** Niger '66: A Peace Corps Diary, is a 2010 Nigerien documentary film directed and produced by Judy Erola for Neska Euskaldunaren Pelikula. The film revolves around the inaugural Peace Corps group during President John F. Kennedy's 1960s-era call for volunteerism and U.S. in the turmoi...
null
Stručně shrň článek o tématu „Obvodová rychlost“ a uveď hlavní fakta.
**Obvodová rychlost** Obvodová rychlost je fyzikální veličina, která vyjadřuje změnu dráhy za jednotku času při pohybu po kružnici. Obvodová rychlost bývá obvykle chápána jako skalární veličina, neboť její směr je vždy určen směrem tečny ke kružnici v daném bodě. Značení Symbol veličiny: v Jednotka SI: metr za sekundu...
null
Stručně shrň článek o tématu „Obecná škola (film)“ a uveď hlavní fakta.
**Obecná škola (film)** Obecná škola je československý film režiséra Jana Svěráka, natočený v roce 1991 podle scénáře Zdeňka Svěráka. Film se stal populární u kritiky i fanoušků a byl dokonce nominován na Oscara za nejlepší zahraniční film. Ve snímku je zachyceno krátké euforické období po 2. světové válce a mnoho mén...
null
Convert this SQL query into MongoDB
SELECT DISTINCT user_name FROM user_login_history WHERE user_id >= 1000
db.user_login_history.distinct("user_name", { "user_id" : { $gte : 1000 } })
null
Create a Python function to generate the first n prime numers.
def generate_prime_numbers(n): prime_nums = [] i = 2 while len(prime_nums) < n: if is_prime(i): prime_nums.append(i) i += 1 return prime_nums 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
Napiš Python funkci: sečte čísla v seznamu (`sum_list`).
```python def sum_list(xs: list[float]) -> float: return sum(xs) ```
null
null
null
null
Commentary on the Apocalypse Commentary on the Apocalypse (Commentaria in Apocalypsin) is a book written in the eighth century by the Spanish monk and theologian Beatus of Liébana (730–785) and copied and illustrated in manuscript in works called "Beati" during the 10th and 11th centuries AD. It is a commentary on the...
Jak bezpečně uložit heslo do databáze?
Nikdy plaintext. Použij pomalý hash s solí: Argon2id, bcrypt nebo scrypt. V Pythonu např. `argon2-cffi` nebo `passlib`.
null
null
null
null
Martin Bareš Martin Bareš (* 25. listopadu 1968 Brno) je český profesor neurologie a akademický funkcionář, od září 2019 rektor Masarykovy univerzity. Předtím zde byl řadu let prorektorem a od února 2018 do září 2019 děkanem Lékařské fakulty Masarykovy univerzity. V letech 2021 až 2023 byl i předsedou České konference...
Write a code snippet to implement a binary search algorithm.
def binary_search(arr, target): start = 0 end = len(arr) - 1 while start <= end: mid = start + (end-start)//2 if arr[mid] == target: return mid elif arr[mid] < target: start = mid + 1 else: end = mid - 1 return -1
null
null
null
null
A-102 (kosmická mise) A-102 (SA-7, Saturn-Apollo 7) byla orbitální mise nosné rakety Saturn I. Byla to druhá mise rakety Saturn s maketou velitelského a servisního modulu kosmické lodi Apollo. Cíle Mise měla zopakovat úspěšný předchozí test A-101 a provést letový test makety kosmické lodi Apollo. Maketa Apollo, sériov...
Kolik je 2 × 14?
2 × 14 = 28
null
What is 21 - 6?
21 - 6 = 15
null
Write a Python function `strip_ws` that odstraní whitespace.
```python def strip_ws(s: str) -> str: return " ".join(s.split()) ```
null
Stručně shrň článek o tématu „Čertůf punk“ a uveď hlavní fakta.
**Čertůf punk** Čertůf punk je česká punková hudební skupina ze Svitav, kde vznikla v roce 1988. Historie Skupina Čertůf se zformovala roku 1988 ve Svitavách. Prvním albem skupiny bylo album Bordel v bordelu, následovalo Stejnej bordel, potom No future a nakonec ještě vyšlo album Fucking world. Skupinu založili Fifi (...
null
Summarize key facts about „Tuke River“ clearly and accurately.
**Tuke River** The Tuke River is a river of the West Coast Region of New Zealand's South Island. It flows northwest from the Southern Alps, combining with the Dickson River to form the Mikonui River 15 kilometres southeast of Ross. See also List of rivers of New Zealand References Rivers of the West Coast, New Zealand...
null
Provide the logic for sorting an array of strings alphabetically.
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]
null
Identify the data structure usage in the following code.
filenames = ['/home/user/project_data/sample_1.json', '/home/user/project_data/sample_2.json']
The data structure used in the code is a list. The list contains two elements - strings which are the filenames of the json files.
null
What causes seasons on Earth?
Seasons are caused mainly by Earth's axial tilt (~23.5°) as it orbits the Sun — not by changing distance to the Sun.
null
Create a Python function which accepts two numbers then return an array with the Fibonacci sequence starting by the two numbers.
start_1: 1 start_2: 2
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
null
Summarize key facts about „Alfonso Flórez Ortiz“ clearly and accurately.
**Alfonso Flórez Ortiz** Alfonzo Flórez Ortiz (November 5, 1952 – April 25, 1992) was a Colombian road racing cyclist who was a professional from 1985 to 1987, where he rode for the Colombian professional cycling team Café de Colombia team. Born in Bucaramanga, Santander Flórez Ortiz won the most important race in Col...
null
Create a function that takes in two integer values and prints out the larger one.
def print_greater_value(num1, num2): if num1 > num2: print(num1) else: print(num2)
null
Stručně shrň článek o tématu „František Kadeřávek“ a uveď hlavní fakta.
**František Kadeřávek** František Kadeřávek (26. června 1885 Praha – 9. února 1961 Praha) byl český matematik a pedagog. Život Po maturitě na reálce v Ječné ulici v Praze, v roce 1902, zahájil František Kadeřávek studia na strojním odboru České vysoké škole technické v Praze. Rozsah učiva probíraného na technice neusp...
null
null
null
null
1821 in Denmark Events from the year 1821 in Denmark. Incumbents Monarch – Frederick VI Events Undated Culture Art 21 May The so-called Copenhagen Mythological Competition is announced via advertisements in several Copenhagen newspapers. Births 9 June Arent Nicolai Dragstedm goldsmith (died 1898) 31 July William Hamme...
null
null
null
Patterns of Childhood Patterns of Childhood, originally published as Kindheitsmuster in German, is a novel written by Christa Wolf and published in 1976. Christa Wolf was a prominent East German novelist known for works such as Der geteilte Himmel (Divided Heaven) and Kassandra. Patterns of Childhood is a highly compl...
Summarize key facts about „Bulboaca“ clearly and accurately.
**Bulboaca** Bulboaca may refer to: Bulboaca, Anenii Noi, a commune in Anenii Noi district, Moldova Bulboaca, Briceni, a commune in Briceni district, Moldova Bulboaca, a village in Deleni, Vaslui, a commune in Vaslui County, Romania Kotlovyna, a village in Ukraine known as in Romanian , a military base in eastern Mold...
null
Explain the concept of merging two sorted lists.
Merging two sorted lists involves examining elements of each list and inserting them in order into a third list. This process continues until all elements from the two lists have been inserted into the third resulting list. The algorithm requires that the two starting lists be in sorted order, although the elements can...
null