wafee-ops commited on
Commit
3a68d40
·
verified ·
1 Parent(s): c89ce4b

Update data.jsonl

Browse files
Files changed (1) hide show
  1. data.jsonl +99 -1
data.jsonl CHANGED
@@ -394,4 +394,102 @@
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(\" \")"}]}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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(\" \")"}]}
398
+
399
+ {"messages":[{"role":"user","content":"I need a Python snippet to check whether a number is a perfect square."},{"role":"assistant","content":"int(n**0.5)**2 == n"}]}
400
+
401
+ {"messages":[{"role":"user","content":"Show me how to convert a list of strings into a single comma-separated string in Python."},{"role":"assistant","content":", ".join(my_list)"}]}
402
+
403
+ {"messages":[{"role":"user","content":"I want a JavaScript example to check if an array includes a value safely."},{"role":"assistant","content":"Array.isArray(arr) && arr.includes(value)"}]}
404
+
405
+ {"messages":[{"role":"user","content":"Show me how to get the last item of a Python set converted to a list."},{"role":"assistant","content":"list(my_set)[-1]"}]}
406
+
407
+ {"messages":[{"role":"user","content":"I need a Go example for checking if a number is even or odd."},{"role":"assistant","content":"if n%2 == 0 {\n fmt.Println(\"even\")\n} else {\n fmt.Println(\"odd\")\n}"}]}
408
+
409
+ {"messages":[{"role":"user","content":"Show me how to convert Celsius to Kelvin in Python."},{"role":"assistant","content":"c + 273.15"}]}
410
+
411
+ {"messages":[{"role":"user","content":"I want a Rust example for converting string to integer safely using Result."},{"role":"assistant","content":"let num: Result<i32, _> = s.parse();"}]}
412
+
413
+ {"messages":[{"role":"user","content":"Show me how to find the second smallest number in a Python list."},{"role":"assistant","content":"sorted(set(my_list))[1]"}]}
414
+
415
+ {"messages":[{"role":"user","content":"I need a SQL query that deletes rows older than a specific date."},{"role":"assistant","content":"DELETE FROM table_name WHERE created_at < '2024-01-01';"}]}
416
+
417
+ {"messages":[{"role":"user","content":"Show me how to check if a string contains only digits in Python."},{"role":"assistant","content":"s.isdigit()"}]}
418
+
419
+ {"messages":[{"role":"user","content":"I want a Java example for converting a list to an array."},{"role":"assistant","content":"list.toArray(new String[0]);"}]}
420
+
421
+ {"messages":[{"role":"user","content":"Show me how to calculate factorial using math library in C++."},{"role":"assistant","content":"// no built-in factorial, use loop or recursion"}]}
422
+
423
+ {"messages":[{"role":"user","content":"I need a Python example for flattening a 2D list using itertools."},{"role":"assistant","content":"import itertools\nlist(itertools.chain.from_iterable(my_list))"}]}
424
+
425
+ {"messages":[{"role":"user","content":"Show me how to check if a JavaScript string is empty after trimming."},{"role":"assistant","content":"s.trim().length === 0"}]}
426
+
427
+ {"messages":[{"role":"user","content":"I want a Go example for checking if a map contains a key safely."},{"role":"assistant","content":"_, ok := m[key]"}]}
428
+
429
+ {"messages":[{"role":"user","content":"Show me how to convert integer to binary string in Python."},{"role":"assistant","content":"bin(n)"}]}
430
+
431
+ {"messages":[{"role":"user","content":"I need a Rust example for checking vector length equality."},{"role":"assistant","content":"vec1.len() == vec2.len()"}]}
432
+
433
+ {"messages":[{"role":"user","content":"Show me how to remove a key from a Python dictionary safely."},{"role":"assistant","content":"my_dict.pop(key, None)"}]}
434
+
435
+ {"messages":[{"role":"user","content":"I want a SQL query that counts rows grouped by status."},{"role":"assistant","content":"SELECT status, COUNT(*) FROM table_name GROUP BY status;"}]}
436
+
437
+ {"messages":[{"role":"user","content":"Show me how to check if a number is divisible by both 2 and 3 in Python."},{"role":"assistant","content":"n % 2 == 0 and n % 3 == 0"}]}
438
+
439
+ {"messages":[{"role":"user","content":"I need a JavaScript example for finding unique values in an array."},{"role":"assistant","content":"[...new Set(arr)]"}]}
440
+
441
+ {"messages":[{"role":"user","content":"Show me how to compute power using recursion in Python."},{"role":"assistant","content":"def power(a, b):\n if b == 0:\n return 1\n return a * power(a, b-1)"}]}
442
+
443
+ {"messages":[{"role":"user","content":"I want a Go example for slicing an array safely."},{"role":"assistant","content":"arr[1:3]"}]}
444
+
445
+ {"messages":[{"role":"user","content":"Show me how to check if a string starts and ends with same character in Python."},{"role":"assistant","content":"s[0] == s[-1]"}]}
446
+
447
+ {"messages":[{"role":"user","content":"I need a C# example for converting string to double."},{"role":"assistant","content":"double.Parse(s);"}]}
448
+
449
+ {"messages":[{"role":"user","content":"Show me how to generate random boolean in JavaScript."},{"role":"assistant","content":"Math.random() > 0.5"}]}
450
+
451
+ {"messages":[{"role":"user","content":"I want a Python example for checking if all values in a dictionary are positive."},{"role":"assistant","content":"all(v > 0 for v in my_dict.values())"}]}
452
+
453
+ {"messages":[{"role":"user","content":"Show me how to merge sorted lists in Python."},{"role":"assistant","content":"sorted(list1 + list2)"}]}
454
+
455
+ {"messages":[{"role":"user","content":"I need a Rust example for iterating over string characters."},{"role":"assistant","content":"for c in s.chars() {\n println!(\"{}\", c);\n}"}]}
456
+
457
+ {"messages":[{"role":"user","content":"Show me how to convert list to tuple in Python."},{"role":"assistant","content":"tuple(my_list)"}]}
458
+
459
+ {"messages":[{"role":"user","content":"I want a SQL query that selects top 3 highest salaries."},{"role":"assistant","content":"SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 3;"}]}
460
+
461
+ {"messages":[{"role":"user","content":"Show me how to check if a JavaScript object is empty."},{"role":"assistant","content":"Object.keys(obj).length === 0"}]}
462
+
463
+ {"messages":[{"role":"user","content":"I need a Go example for converting integer to string using formatting."},{"role":"assistant","content":"fmt.Sprintf(\"%d\", n)"}]}
464
+
465
+ {"messages":[{"role":"user","content":"Show me how to reverse words in JavaScript string."},{"role":"assistant","content":"s.split(\" \").reverse().join(\" \")"}]}
466
+
467
+ {"messages":[{"role":"user","content":"I want a Python example for checking if a string is palindrome ignoring spaces."},{"role":"assistant","content":"s.replace(' ', '') == s.replace(' ', '')[::-1]"}]}
468
+
469
+ {"messages":[{"role":"user","content":"Show me how to calculate square root manually in Python using exponentiation."},{"role":"assistant","content":"n ** 0.5"}]}
470
+
471
+ {"messages":[{"role":"user","content":"I need a Java example for checking if a list contains duplicates."},{"role":"assistant","content":"new HashSet<>(list).size() != list.size()"}]}
472
+
473
+ {"messages":[{"role":"user","content":"Show me how to filter even numbers in JavaScript array."},{"role":"assistant","content":"arr.filter(x => x % 2 === 0)"}]}
474
+
475
+ {"messages":[{"role":"user","content":"I want a Rust example for checking if Option is None."},{"role":"assistant","content":"option.is_none()"}]}
476
+
477
+ {"messages":[{"role":"user","content":"Show me how to convert string to float in Python safely."},{"role":"assistant","content":"float(s)"}]}
478
+
479
+ {"messages":[{"role":"user","content":"I need a C++ example for checking if a vector contains a value."},{"role":"assistant","content":"find(v.begin(), v.end(), value) != v.end()"}]}
480
+
481
+ {"messages":[{"role":"user","content":"Show me how to calculate sum using Python while loop."},{"role":"assistant","content":"total = 0\nwhile n > 0:\n total += n\n n -= 1"}]}
482
+
483
+ {"messages":[{"role":"user","content":"I want a SQL example for updating a column conditionally."},{"role":"assistant","content":"UPDATE table_name SET column = value WHERE condition;"}]}
484
+
485
+ {"messages":[{"role":"user","content":"Show me how to check if a JavaScript number is integer."},{"role":"assistant","content":"Number.isInteger(n)"}]}
486
+
487
+ {"messages":[{"role":"user","content":"I need a Python example for finding max difference in list."},{"role":"assistant","content":"max(my_list) - min(my_list)"}]}
488
+
489
+ {"messages":[{"role":"user","content":"Show me how to join two strings in Go."},{"role":"assistant","content":"s1 + s2"}]}
490
+
491
+ {"messages":[{"role":"user","content":"I want a Rust example for checking if vector contains duplicates."},{"role":"assistant","content":"let mut v2 = v.clone(); v2.sort(); v2.windows(2).any(|w| w[0] == w[1])"}]}
492
+
493
+ {"messages":[{"role":"user","content":"Show me how to convert list to dictionary in Python using index."},{"role":"assistant","content":"{i: v for i, v in enumerate(my_list)}"}]}
494
+
495
+ {"messages":[{"role":"user","content":"I need a Java example for sorting an array in descending order."},{"role":"assistant","content":"Arrays.sort(arr, Collections.reverseOrder());"}]}