Update data.jsonl
Browse files- data.jsonl +101 -1
data.jsonl
CHANGED
|
@@ -294,4 +294,104 @@
|
|
| 294 |
|
| 295 |
{"messages":[{"role":"user","content":"I need a JavaScript example for checking if a string is empty or whitespace."},{"role":"assistant","content":"!s.trim()"}]}
|
| 296 |
|
| 297 |
-
{"messages":[{"role":"user","content":"Show me how to compute factorial using Python math library."},{"role":"assistant","content":"import math\nmath.factorial(n)"}]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
|
| 295 |
{"messages":[{"role":"user","content":"I need a JavaScript example for checking if a string is empty or whitespace."},{"role":"assistant","content":"!s.trim()"}]}
|
| 296 |
|
| 297 |
+
{"messages":[{"role":"user","content":"Show me how to compute factorial using Python math library."},{"role":"assistant","content":"import math\nmath.factorial(n)"}]}
|
| 298 |
+
|
| 299 |
+
{"messages":[{"role":"user","content":"I want a Python example that checks whether a number is divisible by 5."},{"role":"assistant","content":"n % 5 == 0"}]}
|
| 300 |
+
|
| 301 |
+
{"messages":[{"role":"user","content":"Show me how to convert a list of integers to strings in Python."},{"role":"assistant","content":"list(map(str, my_list))"}]}
|
| 302 |
+
|
| 303 |
+
{"messages":[{"role":"user","content":"I need a JavaScript example for checking if an array is not empty."},{"role":"assistant","content":"arr.length > 0"}]}
|
| 304 |
+
|
| 305 |
+
{"messages":[{"role":"user","content":"Show me how to get the first key in a Python dictionary."},{"role":"assistant","content":"next(iter(my_dict))"}]}
|
| 306 |
+
|
| 307 |
+
{"messages":[{"role":"user","content":"I want a Go example for checking if a slice is empty."},{"role":"assistant","content":"len(arr) == 0"}]}
|
| 308 |
+
|
| 309 |
+
{"messages":[{"role":"user","content":"Show me how to convert Fahrenheit to Celsius in Python."},{"role":"assistant","content":"(f - 32) * 5/9"}]}
|
| 310 |
+
|
| 311 |
+
{"messages":[{"role":"user","content":"I need a Rust example for checking if a string is empty."},{"role":"assistant","content":"s.is_empty()"}]}
|
| 312 |
+
|
| 313 |
+
{"messages":[{"role":"user","content":"Show me how to find the index of an element in a Python list."},{"role":"assistant","content":"my_list.index(value)"}]}
|
| 314 |
+
|
| 315 |
+
{"messages":[{"role":"user","content":"I want a SQL query that finds users with duplicate usernames."},{"role":"assistant","content":"SELECT username, COUNT(*) FROM users GROUP BY username HAVING COUNT(*) > 1;"}]}
|
| 316 |
+
|
| 317 |
+
{"messages":[{"role":"user","content":"Show me how to check if a Python list contains a string."},{"role":"assistant","content":"\"text\" in my_list"}]}
|
| 318 |
+
|
| 319 |
+
{"messages":[{"role":"user","content":"I need a Java example for checking if a number is even."},{"role":"assistant","content":"n % 2 == 0"}]}
|
| 320 |
+
|
| 321 |
+
{"messages":[{"role":"user","content":"Show me how to reverse a string in Python without slicing."},{"role":"assistant","content":"''.join(reversed(s))"}]}
|
| 322 |
+
|
| 323 |
+
{"messages":[{"role":"user","content":"I want a C++ example for finding the minimum element in an array."},{"role":"assistant","content":"*min_element(arr, arr + n);"}]}
|
| 324 |
+
|
| 325 |
+
{"messages":[{"role":"user","content":"Show me how to generate random numbers in JavaScript between 0 and 1."},{"role":"assistant","content":"Math.random()"}]}
|
| 326 |
+
|
| 327 |
+
{"messages":[{"role":"user","content":"I need a Python example for checking if a string is alphanumeric."},{"role":"assistant","content":"s.isalnum()"}]}
|
| 328 |
+
|
| 329 |
+
{"messages":[{"role":"user","content":"Show me how to compute factorial using a while loop in Python."},{"role":"assistant","content":"result = 1\nwhile n > 1:\n result *= n\n n -= 1"}]}
|
| 330 |
+
|
| 331 |
+
{"messages":[{"role":"user","content":"I want a Go example for converting a string to float."},{"role":"assistant","content":"strconv.ParseFloat(s, 64)"}]}
|
| 332 |
+
|
| 333 |
+
{"messages":[{"role":"user","content":"Show me how to check if a number is negative in JavaScript."},{"role":"assistant","content":"n < 0"}]}
|
| 334 |
+
|
| 335 |
+
{"messages":[{"role":"user","content":"I need a Rust example for printing all elements in a vector."},{"role":"assistant","content":"for v in vec {\n println!(\"{}\", v);\n}"}]}
|
| 336 |
+
|
| 337 |
+
{"messages":[{"role":"user","content":"Show me how to merge two sets in Python."},{"role":"assistant","content":"set1.union(set2)"}]}
|
| 338 |
+
|
| 339 |
+
{"messages":[{"role":"user","content":"I want a SQL query that finds all records with NULL values."},{"role":"assistant","content":"SELECT * FROM table_name WHERE column_name IS NULL;"}]}
|
| 340 |
+
|
| 341 |
+
{"messages":[{"role":"user","content":"Show me how to get the last key in a Python dictionary."},{"role":"assistant","content":"list(my_dict.keys())[-1]"}]}
|
| 342 |
+
|
| 343 |
+
{"messages":[{"role":"user","content":"I need a Java example for checking if a string starts with a prefix."},{"role":"assistant","content":"s.startsWith(\"abc\")"}]}
|
| 344 |
+
|
| 345 |
+
{"messages":[{"role":"user","content":"Show me how to calculate exponentiation in Python using pow."},{"role":"assistant","content":"pow(a, b)"}]}
|
| 346 |
+
|
| 347 |
+
{"messages":[{"role":"user","content":"I want a JavaScript example for converting a number to string."},{"role":"assistant","content":"String(n)"}]}
|
| 348 |
+
|
| 349 |
+
{"messages":[{"role":"user","content":"Show me how to check if a Python list is empty using boolean context."},{"role":"assistant","content":"if not my_list:\n print(\"empty\")"}]}
|
| 350 |
+
|
| 351 |
+
{"messages":[{"role":"user","content":"I need a C# example for removing an item from a list."},{"role":"assistant","content":"list.Remove(item);"}]}
|
| 352 |
+
|
| 353 |
+
{"messages":[{"role":"user","content":"Show me how to calculate sum of squares in Python."},{"role":"assistant","content":"sum(x*x for x in my_list)"}]}
|
| 354 |
+
|
| 355 |
+
{"messages":[{"role":"user","content":"I want a Go example for checking if a string contains substring."},{"role":"assistant","content":"strings.Contains(s, \"text\")"}]}
|
| 356 |
+
|
| 357 |
+
{"messages":[{"role":"user","content":"Show me how to convert string to lowercase in Java."},{"role":"assistant","content":"s.toLowerCase();"}]}
|
| 358 |
+
|
| 359 |
+
{"messages":[{"role":"user","content":"I need a Python example for finding unique elements in a list."},{"role":"assistant","content":"list(set(my_list))"}]}
|
| 360 |
+
|
| 361 |
+
{"messages":[{"role":"user","content":"Show me how to calculate square root using JavaScript."},{"role":"assistant","content":"Math.sqrt(x)"}]}
|
| 362 |
+
|
| 363 |
+
{"messages":[{"role":"user","content":"I want a Rust example for checking if a number is even."},{"role":"assistant","content":"n % 2 == 0"}]}
|
| 364 |
+
|
| 365 |
+
{"messages":[{"role":"user","content":"Show me how to split a string by commas in Python."},{"role":"assistant","content":"s.split(\",\")"}]}
|
| 366 |
+
|
| 367 |
+
{"messages":[{"role":"user","content":"I need a SQL example for updating multiple rows."},{"role":"assistant","content":"UPDATE table_name SET column_name = value WHERE condition;"}]}
|
| 368 |
+
|
| 369 |
+
{"messages":[{"role":"user","content":"Show me how to convert float to int in Python."},{"role":"assistant","content":"int(x)"}]}
|
| 370 |
+
|
| 371 |
+
{"messages":[{"role":"user","content":"I want a JavaScript example for checking NaN values."},{"role":"assistant","content":"isNaN(x)"}]}
|
| 372 |
+
|
| 373 |
+
{"messages":[{"role":"user","content":"Show me how to iterate over keys in a Python dictionary."},{"role":"assistant","content":"for k in my_dict:\n print(k)"}]}
|
| 374 |
+
|
| 375 |
+
{"messages":[{"role":"user","content":"I need a Go example for appending multiple values to a slice."},{"role":"assistant","content":"arr = append(arr, 1, 2, 3)"}]}
|
| 376 |
+
|
| 377 |
+
{"messages":[{"role":"user","content":"Show me how to check if a string is lowercase in Python."},{"role":"assistant","content":"s.islower()"}]}
|
| 378 |
+
|
| 379 |
+
{"messages":[{"role":"user","content":"I want a C++ example for checking if a number is odd."},{"role":"assistant","content":"if (n % 2 != 0) {\n cout << \"odd\";\n}"}]}
|
| 380 |
+
|
| 381 |
+
{"messages":[{"role":"user","content":"Show me how to calculate factorial using recursion in C."},{"role":"assistant","content":"int factorial(int n) {\n if (n == 0) return 1;\n return n * factorial(n - 1);\n}"}]}
|
| 382 |
+
|
| 383 |
+
{"messages":[{"role":"user","content":"I need a Python example for checking if a file is readable."},{"role":"assistant","content":"import os\nos.access(\"file.txt\", os.R_OK)"}]}
|
| 384 |
+
|
| 385 |
+
{"messages":[{"role":"user","content":"Show me how to get the maximum key in a Python dictionary."},{"role":"assistant","content":"max(my_dict.keys())"}]}
|
| 386 |
+
|
| 387 |
+
{"messages":[{"role":"user","content":"I want a Java example for converting string to integer safely."},{"role":"assistant","content":"Integer.parseInt(s);"}]}
|
| 388 |
+
|
| 389 |
+
{"messages":[{"role":"user","content":"Show me how to check if a list has duplicates in JavaScript."},{"role":"assistant","content":"new Set(arr).size !== arr.length"}]}
|
| 390 |
+
|
| 391 |
+
{"messages":[{"role":"user","content":"I need a Rust example for reversing a vector."},{"role":"assistant","content":"vec.reverse();"}]}
|
| 392 |
+
|
| 393 |
+
{"messages":[{"role":"user","content":"Show me how to compute average using Python list comprehension."},{"role":"assistant","content":"sum(my_list) / len(my_list)"}]}
|
| 394 |
+
|
| 395 |
+
{"messages":[{"role":"user","content":"I want a SQL query that finds the minimum salary."},{"role":"assistant","content":"SELECT MIN(salary) FROM employees;"}]}
|
| 396 |
+
|
| 397 |
+
{"messages":[{"role":"user","content":"Show me how to convert a string to list of words in JavaScript."},{"role":"assistant","content":"s.split(\" \")"}]}
|