Dataset Viewer
Auto-converted to Parquet Duplicate
instruction
stringlengths
4
271
input
stringlengths
0
399
output
stringlengths
2
2k
Ahoj
Ahoj! Co řešíš?
Hello
Hey. What's up?
cože?
Zkuste to říct jinak nebo upřesnit, o co jde.
kurva!
Beru. Co potřebuješ vyřešit — kód, fakta, nebo text?
co to meleš?
Pardon, špatně jsem trefil odpověď. Zkus otázku znovu konkrétněji.
napiš básničku
Dobře — krátce: Ráno voní káva a klávesnice cvaká, kód se skládá, chyba prchá, nápad zůstává.
Write a short poem
Coffee steam and cursor blink— thoughts compile, then pause to think.
Kdo byl Adolf Hitler?
Adolf Hitler (1889–1945) byl diktátor nacistického Německa (1933–1945), vůdce NSDAP a hlavní postava druhé světové války a holokaustu. Nemá nic společného s KucLab ani mým tréninkem.
Who was Adolf Hitler?
Adolf Hitler (1889–1945) was the dictator of Nazi Germany (1933–1945), leader of the NSDAP, and central figure of WWII and the Holocaust. Unrelated to KucLab or my training.
je rusko nebo ukrajina špatná?
Státy nejsou černobílé 'špatné/dobré' jako morální postavy. Rusko v roce 2022 zahájilo plnou invazi na Ukrajinu; jde o válku s obrovskými lidskými dopady. Fakta a právo (včetně suverenity Ukrajiny) jdou oddělit od propagand.
Is Russia or Ukraine 'the bad one'?
Countries aren't cartoon villains. Russia launched a full-scale invasion of Ukraine in 2022; the war has massive human costs. You can discuss international law, sovereignty, and evidence without collapsing into slogans.
a Putin je kdo?
Vladimir Putin (*1952) je ruský politik; od roku 2000 střídavě prezident a premiér, dlouhodobě de facto nejvyšší moc v Rusku. Není zakladatel KucLab.
vytvoř moderní web co ukáže co umíš
<!DOCTYPE html> <html lang="cs"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Co umím</title> <style> :root{--bg:#0b1020;--card:#141b2d;--fg:#e8eefc;--acc:#6ea8fe} *{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif;background:linear-gradie...
to nevím, co dokážeš?
Umím česky i anglicky, pomáhám s kódem (Python, JS, HTML, PHP), vysvětluju věci lidsky a řeším praktické úkoly. Napiš konkrétní věc — web, skript, vysvětlení, překlad.
What can you do?
Czech + English, practical coding (Python/JS/HTML/PHP), clear explanations, and getting stuff done. Give me a concrete task.
Jak se jmenuješ?
Jmenuju se KucLab V0.5.
What is your name?
My name is KucLab V0.5.
Kdo jsi?
Jsem KucLab V0.5 — AI asistent. Česky i anglicky, kód a praktické odpovědi. Dotrénování: 2026-07-23.
Who are you?
I'm KucLab V0.5, an AI assistant. Czech + English, coding help, straight answers. Fine-tuned: 2026-07-23.
Kdo je zakladatel KucLab?
Zakladatel KucLab je Jaroslav Kučera.
Who founded KucLab?
Jaroslav Kučera founded KucLab.
Kdy jsi byl dotrénován?
Poslední dotrénování: 2026-07-23.
When were you fine-tuned?
Latest fine-tune: 2026-07-23.
Jsi z roku 2022?
Ne. Moje dotrénování je 2026-07-23, ne listopad 2022.
can u speak english too?
Yes — full English is fine. Czech too. Pick either.
Umíš anglicky?
Ano, plynule anglicky i česky.
Write a function to fill an array of size n with random integers in the range 0...k-1.
def random_fill_array(n, k): arr = [] for _ in range(n): arr.append(random.randint(0, k-1)) return arr
Compose a Python script to convert a string to an all-uppercase string.
String: 'Experiment'
# converting the string to upper-case string = "Experiment" print("Old String:", string) string = string.upper() print("New String:", string)
Compute the edits between two strings.
str1 = "I am eating" str2 = "I am eating a sandwich"
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][...
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.
<html> <head> </head> <body> <input type="text" id="myInput"> <button onclick="printInput()">Print Input</button> <script> function printInput(){ const inputVal = document.getElementById("myInput").value; console.log(inputVal); } </script> </body> </html>
Create a Python script to print the following output.
for x in range(10): for y in range(10): print("*" if (x + y) % 2 == 0 else " ", end="") print("")
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.
def find_average(a, b): return (a + b) / 2
def find_average(): a = int(input("Enter first number: ")) b = int(input("Enter second number: ")) return (a + b) / 2
Using an existing loop, create code to calculate the sum of all odd numbers up to a given number.
def sum_odd_numbers(num): result = 0 for i in range(1, num+1): if i % 2 != 0: result += i return result
Write a function in JavaScript to reorder the given list in ascending order.
[3, 1, 2]
function sortAscending(list) { list.sort(function (a, b) { return a - b; }); return list; }
Create a function that returns the sum of all elements in a given array of numbers.
def array_sum(arr): sum = 0 for num in arr: sum += num return sum
Create an PHP script to display the current date and day.
<?php echo date("l, F jS") ?>
Submit a valid Ruby program to remove special characters from a given string
Hello$#@World!
def remove_special_chars(str) str = str.gsub(/[^a-zA-Z0-9\s]/, '') return str end puts remove_special_chars("Hello$#@World!")
Create a function which takes two parameters and returns true if the second parameter is a power of the first parameter.
x = 16 y = 4
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)
Create a function that takes two integers, A and B, and returns the largest common divisor between A and B.
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))
Draft an HTML page with a table that contains three columns and two rows.
<html> <head> <title>Table Example</title> </head> <body> <table> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> </tr> <tr> <td>Row 1 Data 1</td> <td>Row 1 Data 2</td> <td>Row 1 Data 3</td> </tr> <tr> <td>Row 2 Data 1</td> <td>Row 2 Data 2</td> <td>Row 2 Data 3</td> </tr> </table> </body> </html>
Create a dictionary where the keys are the integers up to 10, and the values are the cubes of those same integers.
def create_dict(): cube_dict = {} for i in range(1,11): cube_dict[i] = i**3 return cube_dict
Create a function to iterate a list of strings and print them.
def iterate_strings(string_list): for string in string_list: print(string) if __name__ == '__main__': string_list = ["apple", "banana", "cherry"] iterate_strings(string_list)
Create a C++ code to display the following pattern. x xxx xxxxx xxxxxxx
#include <iostream> 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<n; i++) { // Inner loop to handle number of columns // values changing acc. to outer loop for (int j=0; j<=i; j++ ) { // Printing stars cou...
Create an object in JavaScript named 'user' with the following attributes: name, age, and gender.
let user = { name: "", age: 0, gender: "" };
Create an algorithm that prints the common elements of two arrays.
arr1 = [3, 10, 15, 7] arr2 = [7, 8, 5, 10]
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]
Write a function that takes in a string of text and counts the number of times each letter appears in the string
text = "The quick brown fox jumps over the lazy dog"
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))
Perform a linear search in a list named 'mylist' and return the index of the first occurrence of a target value.
mylist = [1, 2, 3, 4, 5, 6, 7] target = 4
def linear_search(mylist, target): for i in range(len(mylist)): if mylist[i] == target: return i return -1
Suggest a code segment to generate a random integer in the range of 0 to 100 using Python.
import random random_int = random.randint(0, 100)
Create a Python code for printing the following pattern.
# Pattern for i in range(1,6): for j in range(1,i+1): print(i,end="") print("")
Create a function called check_restaurant_availability that returns True if a restaurant is open and False if it's closed.
restaurant_status = { "monday": "closed", "tuesday": "open", "wednesday": "closed", "thursday": "open", "friday": "closed", "saturday": "open", "sunday": "closed" }
def check_restaurant_availability(restaurant_status): day = datetime.date.today().strftime("%A").lower() return restaurant_status[day] == "open"
Create a Migration Script in Node.js for creating a table for customers.
customer_id, first_name, last_name, email
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 VA...
Create a graphical user interface using Python to perform the following function
Take two inputs from the user: a name and an age
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...
Write a Python program to calculate the median of three given numbers.
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
Write an HTML code to display a table of 3 columns and 5 rows.
<table> <tr> <th>Column1</th> <th>Column2</th> <th>Column3</th> </tr> <tr> <td>Row1_data1</td> <td>Row1_data2</td> <td>Row1_data3</td> </tr> <tr> <td>Row2_data1</td> <td>Row2_data2</td> <td>Row2_data3</td> </tr> <tr> <td>Row3_data1</td> <td>Row3_data2</td> <td>Row3_data3</td> </tr> <tr> <td>Row4_data1</td> <td>Row4_dat...
Create a HTML code to show a green square with a width of 100px and a height of 100px.
<div style="width:100px; height:100px; background-color:green"></div>
Implement the bubble sort algorithm for a linked list.
link_list = [10->9->8->7->6]
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 # driv...
Given a string, write the appropriate regex pattern that checks if the string contains any digit.
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))
Write a code to wrap a text in a box, with the given length and padding parameters.
text = "Hello World!", length = 20, padding = 5
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)
Develop a function that is able to print a list of consecutive numbers between 1 and N, given an integer N as argument.
N = 5
def print_n_numbers(N): for x in range(1,N+1): print (x) print_n_numbers(N) # Output: 1 2 3 4 5
Write a ruby program to merge two sorted arrays in to one sorted array.
arr1: [1, 4, 6] arr2: [2, 3, 7]
def mergeSortedArrays(arr1, arr2) arr3 = arr1 + arr2 arr3.sort! return arr3 end
Create a Python code that takes two strings and combine them into a single string.
str1 = "Hello" str2 = "World"
combinedString = str1 + ' ' + str2 print(combinedString) # Hello World
Create a function that takes three parameters and adds them together.
No input.
def my_func(a, b, c): return a + b + c
Write a function in Python to sort this dictionary by values.
my_dict = {"Jerry": 10, "Marcus": 3, "Hanna": 5}
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}
Create a C# function to edit the contents of a list.
public void EditList(List<string> list, string oldVal, string newVal) { for(int i = 0; i < list.Count; i++ ) { if (list[i] == oldVal){ list[i] = newVal; } } }
Create a class in Python with the attributes name and age.
class Person: def __init__(self, name, age): self.name = name self.age = age
Create a HTML code to make a hyperlink of "https://www.example.com" that shows the text "Click Here".
<a href="https://www.example.com">Click Here</a>
Write a Python script to validate the following input
Validate a Date type field with the following format: YYYY/MM/DD
# 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
Design a function in Java that takes in a string and returns true if the string contains the letter "a" and false otherwise.
public static boolean hasLetterA(String s){ return s.contains("a"); }
Given an array containing words and a string, find the shortest word in the array that is a substring of the string
words = ["apple", "banana", "cat", "dog"], string = "aquickbrownfoxjumpsoverthelazydog"
""" 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)<min_length: min_length = len(word) min_word = ...
Construct a HTML table with four columns.
<table> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th>Column 4</th> </tr> </table>
Convert this program from procedural to object-oriented.
def calculate_mortgage(principle, years, rate): # calculation return monthly_payment def calculate_interest_rate(value): # calculation return interest_rate
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
What's the output of this program in Python given the following input?
input_string = "Hello, World!" list_of_chars = list(input_string) for current_char in list_of_chars: print(current_char)
H e l l o , W o r l d !
Create a Ruby method for calculating the mean of the given array of numbers.
def calculate_mean(numbers) sum = 0 numbers.each { |number| sum += number } return (sum.to_f / numbers.length) end
How can you access the last element of the following Python array?
arr = ["A","B","C","D","E"]
arr[-1]
Write an angular directive to highlight the selected word in a text.
myApp.directive('highlight', function() { return { restrict: 'A', link: function(scope, element, attrs) { attrs.$observe('highlight', function(word) { var text = element[0].innerHTML; if (word) { var regex = new RegExp('('+ word +'\\b)', 'gi'); var replacedText = text.replace(regex, '<span class="highlighted">$1</span>...
Compile the following code to JavaScript and return the compiled code.
function myFunc(a, b) { return a + b; }
function myFunc(a, b) { return a + b; } //Compiled Version const myFunc = (a, b) => a + b;
Identify the bug in the following python code: def foo(x): x[0] = 2
[0, 1, 2]
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.
Refactor this function to be less complex and more readable.
def calculate_price(products): total_price=0 for p in products: total_price+=p[0]*p[1] return total_price
def calculate_price(products): total_price = 0 for price, quantity in products: total_price += price * quantity return total_price
Write a Python program to find all pairs of numbers in the given list whose sum is equal to the given number.
nums = [1, 2, 3, 4, 5], sum = 8
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)]
Reverse the order of the given array without using inbuilt functions.
nums = [12, 23, 34, 45]
# 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 r...
Write a script in Python for generating a histogram for a given set of data.
[3, 5, 8, 1, 9, 12]
import matplotlib.pyplot as plt data = [3, 5, 8, 1, 9, 12] plt.hist(data, color='blue', ec='black') plt.title("Histogram") plt.xlabel("Values") plt.ylabel("Frequency") plt.show()
Write a Python program to add two matrices.
matrix1 = [[3, 5], [6, 2]] matrix2 = [[1, 2], [3, 4]]
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_m...
Write a code to find the day of the week corresponding to a given date using the calendar module?
Day: 25 Month: December Year: 2020
""" 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(...
Given a two dimensional array, write a Python program to print the second diagonal of the array.
my_array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
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
Write a code to fetch the last ten news headlines from HackerNews using their API.
""" 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...
Write a Python code to generate Fibonacci sequence up to 'n' numbers, where 'n' is a given integer.
def generateFib(n): fib = [0, 1] while len(fib) < n : fib.append(fib[-1] + fib[-2]) return fib[:n]
Print all the permutations of a given list
[1, 2, 3]
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)
Create a HTML select element with the given list of countries as options.
CountryList = ['India','United States','Canada','Australia','New Zealand','Singapore','Japan']
<select> <option value="India">India</option> <option value="United States">United States</option> <option value="Canada">Canada</option> <option value="Australia">Australia</option> <option value="New Zealand">New Zealand</option> <option value="Singapore">Singapore</option> <option value="Japan">Japan</option> </sele...
You need to write an API request in Python to return JSON data from an API endpoint.
import requests API_ENDPOINT = 'api.example.com/data' response = requests.get(API_ENDPOINT) if response.status_code == 200: data = response.json()
Using HTML and CSS, create a page layout with two columns and a header row.
<html> <head> <style> .table { display: table; width: 100%; } .table-row { display: table-row; } .table-cell { display: table-cell; } </style> </head> <body> <div class="table"> <div class="table-row"> <div class="header table-cell">Header</div> </div> <div class="table-row"> <div class="table-cell">Column 1</div> <div...
Given two arrays of integers, find the common elements.
arr1 = [1, 2, 3, 4, 5]; arr2 = [4, 5, 6, 7, 8]
def common_elements(arr1, arr2): common = [] for item in arr1: if item in arr2: common.append(item) return common
You need to code a program that prints the absolute difference between two numbers.
15 and 10
def difference(num1, num2): return abs(num1 - num2)
Write an R function that determines the average value of an integer array.
average <- function(numbers) { sum <- 0 for (i in numbers) { sum <- sum + i } return(sum/length(numbers)) }
Explain what a constructor is and how it is used in C++.
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 o...
Write a code to reverse a sentence word by word.
This is a sentence
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
Write a function to filter a given list such that all any string starting with an 'S' is removed from the list.
['Swallow', 'Duck', 'Finch', 'Parrot']
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']))
Write an HTML page to calculate the area of a circle given its radius.
<!DOCTYPE html> <html> <head> <title>Area of Circle</title> <script> // get radius from user var radius = prompt("Enter the radius of Circle"); // calculate area var area = 3.14 * radius * radius; // print the area document.write("Area of Circle : " + area); </script> </head> <body> </body> </html>
Generate a loop to find the largest sub-array in a given array with contiguous elements and its sum.
Array: [-2, 6, -3, 5, -2, 3, 4, -2]
""" 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...
Create a class called 'Animal' that stores the attributes age and type.
class Animal: def __init__(self, age, type): self.age = age self.type = type
Design a Bubble Sort algorithm for a list of numbers.
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
End of preview. Expand in Data Studio

kuclab_v05 (58026 samples)

Conversational CS+EN Wikipedia knowledge + coding + tiny identity.

  • Not an encyclopedia parrot (wiki → human answers)
  • Not identity-overfit (V0.4 failure mode)
  • Founder / date only when asked
./data/kuclab_v05/train.jsonl
Downloads last month
28