Update data.jsonl
Browse files- data.jsonl +101 -1
data.jsonl
CHANGED
|
@@ -98,4 +98,104 @@
|
|
| 98 |
|
| 99 |
{"messages":[{"role":"user","content":"Show me how to convert a string to float in Python."},{"role":"assistant","content":"float(s)"}]}
|
| 100 |
|
| 101 |
-
{"messages":[{"role":"user","content":"I need a Java example for trimming whitespace."},{"role":"assistant","content":"s.trim();"}]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
{"messages":[{"role":"user","content":"Show me how to convert a string to float in Python."},{"role":"assistant","content":"float(s)"}]}
|
| 100 |
|
| 101 |
+
{"messages":[{"role":"user","content":"I need a Java example for trimming whitespace."},{"role":"assistant","content":"s.trim();"}]}
|
| 102 |
+
|
| 103 |
+
{"messages":[{"role":"user","content":"I want to check if a Python dictionary is empty or not."},{"role":"assistant","content":"len(my_dict) == 0"}]}
|
| 104 |
+
|
| 105 |
+
{"messages":[{"role":"user","content":"Show me how to get the last element of a list in Python."},{"role":"assistant","content":"my_list[-1]"}]}
|
| 106 |
+
|
| 107 |
+
{"messages":[{"role":"user","content":"I need a JavaScript example for checking if a variable is undefined."},{"role":"assistant","content":"typeof x === \"undefined\""}]}
|
| 108 |
+
|
| 109 |
+
{"messages":[{"role":"user","content":"Show me how to convert Celsius to Fahrenheit in Python."},{"role":"assistant","content":"(c * 9/5) + 32"}]}
|
| 110 |
+
|
| 111 |
+
{"messages":[{"role":"user","content":"I want a Go example for converting a string to uppercase."},{"role":"assistant","content":"strings.ToUpper(s)"}]}
|
| 112 |
+
|
| 113 |
+
{"messages":[{"role":"user","content":"Show me how to check if a number is within a range in Python."},{"role":"assistant","content":"0 <= n <= 10"}]}
|
| 114 |
+
|
| 115 |
+
{"messages":[{"role":"user","content":"I need a Rust example for checking string equality."},{"role":"assistant","content":"if s1 == s2 {\n println!(\"equal\");\n}"}]}
|
| 116 |
+
|
| 117 |
+
{"messages":[{"role":"user","content":"Show me how to create a list of squares in Python."},{"role":"assistant","content":"[x*x for x in range(10)]"}]}
|
| 118 |
+
|
| 119 |
+
{"messages":[{"role":"user","content":"I want a SQL query that finds the second highest salary."},{"role":"assistant","content":"SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);"}]}
|
| 120 |
+
|
| 121 |
+
{"messages":[{"role":"user","content":"Show me how to check if a string is uppercase in Python."},{"role":"assistant","content":"s.isupper()"}]}
|
| 122 |
+
|
| 123 |
+
{"messages":[{"role":"user","content":"I need a Java example for splitting a string."},{"role":"assistant","content":"s.split(\" \");"}]}
|
| 124 |
+
|
| 125 |
+
{"messages":[{"role":"user","content":"Show me how to calculate modulo in JavaScript."},{"role":"assistant","content":"a % b"}]}
|
| 126 |
+
|
| 127 |
+
{"messages":[{"role":"user","content":"I want a Python example for checking even numbers using bitwise operators."},{"role":"assistant","content":"n & 1 == 0"}]}
|
| 128 |
+
|
| 129 |
+
{"messages":[{"role":"user","content":"Show me how to initialize an empty set in Python."},{"role":"assistant","content":"set()"}]}
|
| 130 |
+
|
| 131 |
+
{"messages":[{"role":"user","content":"I need a C++ example for swapping two variables."},{"role":"assistant","content":"swap(a, b);"}]}
|
| 132 |
+
|
| 133 |
+
{"messages":[{"role":"user","content":"Show me how to convert a string to a boolean in Python."},{"role":"assistant","content":"bool(s)"}]}
|
| 134 |
+
|
| 135 |
+
{"messages":[{"role":"user","content":"I want a Go example for checking string length."},{"role":"assistant","content":"len(s)"}]}
|
| 136 |
+
|
| 137 |
+
{"messages":[{"role":"user","content":"Show me how to calculate factorial using recursion in JavaScript."},{"role":"assistant","content":"function factorial(n) {\n if (n === 0) return 1;\n return n * factorial(n - 1);\n}"}]}
|
| 138 |
+
|
| 139 |
+
{"messages":[{"role":"user","content":"I need a Python example for merging two sets."},{"role":"assistant","content":"set1 | set2"}]}
|
| 140 |
+
|
| 141 |
+
{"messages":[{"role":"user","content":"Show me how to remove duplicates from a string in Python."},{"role":"assistant","content":"\"\".join(set(s))"}]}
|
| 142 |
+
|
| 143 |
+
{"messages":[{"role":"user","content":"I want a Java example for checking array length."},{"role":"assistant","content":"arr.length"}]}
|
| 144 |
+
|
| 145 |
+
{"messages":[{"role":"user","content":"Show me how to check if a number is divisible by 3 in Python."},{"role":"assistant","content":"n % 3 == 0"}]}
|
| 146 |
+
|
| 147 |
+
{"messages":[{"role":"user","content":"I need a Rust example for converting integer to float."},{"role":"assistant","content":"let f = n as f64;"}]}
|
| 148 |
+
|
| 149 |
+
{"messages":[{"role":"user","content":"Show me how to join a list into a string in Python."},{"role":"assistant","content":"\" \".join(my_list)"}]}
|
| 150 |
+
|
| 151 |
+
{"messages":[{"role":"user","content":"I want a SQL query for selecting top 5 rows."},{"role":"assistant","content":"SELECT * FROM table_name LIMIT 5;"}]}
|
| 152 |
+
|
| 153 |
+
{"messages":[{"role":"user","content":"Show me how to check if a list has even numbers in Python."},{"role":"assistant","content":"any(x % 2 == 0 for x in my_list)"}]}
|
| 154 |
+
|
| 155 |
+
{"messages":[{"role":"user","content":"I need a JavaScript example for generating random integers."},{"role":"assistant","content":"Math.floor(Math.random() * 10)"}]}
|
| 156 |
+
|
| 157 |
+
{"messages":[{"role":"user","content":"Show me how to calculate square root in JavaScript."},{"role":"assistant","content":"Math.sqrt(x)"}]}
|
| 158 |
+
|
| 159 |
+
{"messages":[{"role":"user","content":"I want a Go example for appending to a slice dynamically."},{"role":"assistant","content":"arr = append(arr, value)"}]}
|
| 160 |
+
|
| 161 |
+
{"messages":[{"role":"user","content":"Show me how to check if a string starts with a number in Python."},{"role":"assistant","content":"s[0].isdigit()"}]}
|
| 162 |
+
|
| 163 |
+
{"messages":[{"role":"user","content":"I need a C# example for converting string to int safely."},{"role":"assistant","content":"int.TryParse(s, out int result);"}]}
|
| 164 |
+
|
| 165 |
+
{"messages":[{"role":"user","content":"Show me how to compute exponent power in JavaScript."},{"role":"assistant","content":"Math.pow(a, b)"}]}
|
| 166 |
+
|
| 167 |
+
{"messages":[{"role":"user","content":"I want a Python example for checking prime numbers using a loop."},{"role":"assistant","content":"def is_prime(n):\n if n < 2:\n return False\n for i in range(2, n):\n if n % i == 0:\n return False\n return True"}]}
|
| 168 |
+
|
| 169 |
+
{"messages":[{"role":"user","content":"Show me how to remove whitespace from both ends of a string in JavaScript."},{"role":"assistant","content":"s.trim()"}]}
|
| 170 |
+
|
| 171 |
+
{"messages":[{"role":"user","content":"I need a Rust example for creating a vector of integers."},{"role":"assistant","content":"let v = vec![1, 2, 3];"}]}
|
| 172 |
+
|
| 173 |
+
{"messages":[{"role":"user","content":"Show me how to calculate average of a list in Python."},{"role":"assistant","content":"sum(my_list) / len(my_list)"}]}
|
| 174 |
+
|
| 175 |
+
{"messages":[{"role":"user","content":"I want a Java example for converting integer to string."},{"role":"assistant","content":"String.valueOf(n);"}]}
|
| 176 |
+
|
| 177 |
+
{"messages":[{"role":"user","content":"Show me how to check if a number is odd in JavaScript."},{"role":"assistant","content":"n % 2 !== 0"}]}
|
| 178 |
+
|
| 179 |
+
{"messages":[{"role":"user","content":"I need a Python example for finding intersection of two sets."},{"role":"assistant","content":"set1 & set2"}]}
|
| 180 |
+
|
| 181 |
+
{"messages":[{"role":"user","content":"Show me how to generate a list of even numbers in Python."},{"role":"assistant","content":"[x for x in range(20) if x % 2 == 0]"}]}
|
| 182 |
+
|
| 183 |
+
{"messages":[{"role":"user","content":"I want a Go example for checking if a string is empty."},{"role":"assistant","content":"len(s) == 0"}]}
|
| 184 |
+
|
| 185 |
+
{"messages":[{"role":"user","content":"Show me how to format decimal numbers in Python."},{"role":"assistant","content":"format(x, \".2f\")"}]}
|
| 186 |
+
|
| 187 |
+
{"messages":[{"role":"user","content":"I need a SQL example for counting distinct values."},{"role":"assistant","content":"SELECT COUNT(DISTINCT column_name) FROM table_name;"}]}
|
| 188 |
+
|
| 189 |
+
{"messages":[{"role":"user","content":"Show me how to create a constant in JavaScript."},{"role":"assistant","content":"const x = 10;"}]}
|
| 190 |
+
|
| 191 |
+
{"messages":[{"role":"user","content":"I want a C++ example for checking string equality."},{"role":"assistant","content":"if (s1 == s2) {\n cout << \"equal\";\n}"}]}
|
| 192 |
+
|
| 193 |
+
{"messages":[{"role":"user","content":"Show me how to reverse words in a sentence in Python."},{"role":"assistant","content":"\" \".join(sentence.split()[::-1])"}]}
|
| 194 |
+
|
| 195 |
+
{"messages":[{"role":"user","content":"I need a Rust example for checking if a vector contains a value."},{"role":"assistant","content":"vec.contains(&value)"}]}
|
| 196 |
+
|
| 197 |
+
{"messages":[{"role":"user","content":"Show me how to convert a list to a string in Python."},{"role":"assistant","content":"str(my_list)"}]}
|
| 198 |
+
|
| 199 |
+
{"messages":[{"role":"user","content":"I want a JavaScript example for finding array length."},{"role":"assistant","content":"arr.length"}]}
|
| 200 |
+
|
| 201 |
+
{"messages":[{"role":"user","content":"Show me how to calculate factorial using iteration in Python."},{"role":"assistant","content":"result = 1\nfor i in range(1, n+1):\n result *= i"}]}
|