Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    ArrowInvalid
Message:      JSON parse error: Missing a closing quotation mark in string. in row 12880
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 324, in _generate_tables
                  df = pandas_read_json(f)
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 38, in pandas_read_json
                  return pd.read_json(path_or_buf, **kwargs)
                         ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 815, in read_json
                  return json_reader.read()
                         ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 1014, in read
                  obj = self._get_object_parser(self.data)
                File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 1040, in _get_object_parser
                  obj = FrameParser(json, **kwargs).parse()
                File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 1176, in parse
                  self._parse()
                  ~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/pandas/io/json/_json.py", line 1392, in _parse
                  ujson_loads(json, precise_float=self.precise_float), dtype=None
                  ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              ValueError: Trailing data
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1816, in _prepare_split_single
                  for key, table in generator:
                                    ^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 613, in wrapped
                  for item in generator(*args, **kwargs):
                              ~~~~~~~~~^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 327, in _generate_tables
                  raise e
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 290, in _generate_tables
                  pa_table = paj.read_json(
                      io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
                  )
                File "pyarrow/_json.pyx", line 342, in pyarrow._json.read_json
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                  return check_status(status)
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
                  raise convert_status(status)
              pyarrow.lib.ArrowInvalid: JSON parse error: Missing a closing quotation mark in string. in row 12880
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1869, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

id
string
source
string
category
string
language
string
difficulty
string
conversations
list
metadata
dict
code_generation_3c622f7a_1_0
synthetic_coding_dataset_v1
code_generation
Swift
beginner
[ { "from": "human", "value": "Implement manage state in Swift." }, { "from": "gpt", "value": "Here's the Swift implementation:\n\n```swift\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key):\n return self.data.get(key)\n ...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 336 }
code_generation_d1a49507_1_1
synthetic_coding_dataset_v1
code_generation
Rust
intermediate
[ { "from": "human", "value": "Create a Rust solution for build a REST client." }, { "from": "gpt", "value": "Here's the Rust implementation:\n\n```rust\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n```\...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 267 }
explanation_cc4d8d33_1_2
synthetic_coding_dataset_v1
explanation
Python
intermediate
[ { "from": "human", "value": "Explain generics in Python." }, { "from": "gpt", "value": "## generics\n\ngenerics is fundamental to Python programming.\n\n### How It Works\n\nIt manages state efficiently using:\n1. Encapsulation\n2. Type hints\n3. Error handling\n\n### Example\n\n```python\nSELECT...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 387 }
code_generation_7729a4e0_1_3
synthetic_coding_dataset_v1
code_generation
Java
intermediate
[ { "from": "human", "value": "Create a Java class for validate inputs." }, { "from": "gpt", "value": "Here's the Java class:\n\n```java\ndef process_data(data):\n results = []\n for item in data:\n if item:\n results.append(transform(item))\n return results\n\ndef trans...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 327 }
code_generation_4df49078_1_4
synthetic_coding_dataset_v1
code_generation
Kotlin
intermediate
[ { "from": "human", "value": "Write Kotlin code for parse JSON data." }, { "from": "gpt", "value": "Here's the Kotlin solution:\n\n```kotlin\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < pivot]\n mid = [x for x in arr if...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 380 }
algorithm_f6715973_1_5
synthetic_coding_dataset_v1
algorithm
C++
advanced
[ { "from": "human", "value": "Implement BFS in C++." }, { "from": "gpt", "value": "## BFS in C++\n\n### Complexity\n- Time: O(V+E)\n- Space: O(V)\n\n### Implementation\n\n```cpp\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key)...
{ "task_type": "algorithm", "has_code": true, "tokens_approx": 362 }
code_generation_83af21a4_1_6
synthetic_coding_dataset_v1
code_generation
Kotlin
beginner
[ { "from": "human", "value": "Write Kotlin code for manage state." }, { "from": "gpt", "value": "Here's the Kotlin solution:\n\n```kotlin\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nUses coroutines and...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 245 }
best_practices_257a25bf_1_7
synthetic_coding_dataset_v1
best_practices
JavaScript
beginner
[ { "from": "human", "value": "Best practices for logging in JavaScript?" }, { "from": "gpt", "value": "## logging Best Practices in JS\n\n### Guidelines\n1. Use const/let, never var\n2. Async/await over callbacks\n3. Validate all inputs\n4. Handle promise rejections\n5. Use strict mode\n\n### Exa...
{ "task_type": "best_practices", "has_code": true, "tokens_approx": 476 }
code_generation_7464319e_1_8
synthetic_coding_dataset_v1
code_generation
JavaScript
expert
[ { "from": "human", "value": "Implement process files in JavaScript." }, { "from": "gpt", "value": "Here's the JavaScript implementation:\n\n```javascript\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < pivot]\n mid = [x f...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 410 }
code_generation_138fa88a_1_9
synthetic_coding_dataset_v1
code_generation
Kotlin
advanced
[ { "from": "human", "value": "Write Kotlin code for search efficiently." }, { "from": "gpt", "value": "Here's the Kotlin solution:\n\n```kotlin\ndef process_data(data):\n results = []\n for item in data:\n if item:\n results.append(transform(item))\n return results\n\nd...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 319 }
code_generation_447a8664_1_10
synthetic_coding_dataset_v1
code_generation
PHP
advanced
[ { "from": "human", "value": "Create PHP code to process files." }, { "from": "gpt", "value": "Here's the PHP implementation:\n\n```php\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < pivot]\n mid = [x for x in arr if x ==...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 369 }
code_generation_1517f779_1_11
synthetic_coding_dataset_v1
code_generation
TypeScript
beginner
[ { "from": "human", "value": "Write TypeScript code to sort data." }, { "from": "gpt", "value": "Here's the TypeScript implementation:\n\n```typescript\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nInclu...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 267 }
code_generation_b1995664_1_12
synthetic_coding_dataset_v1
code_generation
Java
intermediate
[ { "from": "human", "value": "Create a Java class for create a queue." }, { "from": "gpt", "value": "Here's the Java class:\n\n```java\ndef process_data(data):\n results = []\n for item in data:\n if item:\n results.append(transform(item))\n return results\n\ndef transf...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 326 }
code_generation_960e8bc4_1_13
synthetic_coding_dataset_v1
code_generation
Ruby
advanced
[ { "from": "human", "value": "Implement search efficiently in Ruby." }, { "from": "gpt", "value": "Here's the Ruby solution:\n\n```ruby\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n```\n\nFollows Ruby idioms with blocks and metapro...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 235 }
code_generation_878edaeb_1_14
synthetic_coding_dataset_v1
code_generation
Ruby
advanced
[ { "from": "human", "value": "Implement implement caching in Ruby." }, { "from": "gpt", "value": "Here's the Ruby solution:\n\n```ruby\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n```\n\nFollows Ruby i...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 263 }
design_pattern_97a82c40_1_15
synthetic_coding_dataset_v1
design_pattern
Python
expert
[ { "from": "human", "value": "Explain the decorator pattern in Python." }, { "from": "gpt", "value": "## decorator Pattern\n\nAdd behavior dynamically\n\n### Code\n\n```python\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n```\n\n###...
{ "task_type": "design_pattern", "has_code": true, "tokens_approx": 302 }
best_practices_95f443c5_1_16
synthetic_coding_dataset_v1
best_practices
Python
intermediate
[ { "from": "human", "value": "What are best practices for code organization in Python?" }, { "from": "gpt", "value": "## code organization Best Practices\n\n### Key Principles\n1. Validate all inputs\n2. Handle errors\n3. Write tests\n4. Document APIs\n5. Use type hints\n\n### Example\n\n```pytho...
{ "task_type": "best_practices", "has_code": true, "tokens_approx": 429 }
algorithm_4203d91c_1_17
synthetic_coding_dataset_v1
algorithm
Python
beginner
[ { "from": "human", "value": "Implement Dijkstra in Python." }, { "from": "gpt", "value": "## Dijkstra\n\n### Complexity\n- Time: O((V+E)log V)\n- Space: O(V)\n\n### Implementation\n\n```python\ndef process_data(data):\n results = []\n for item in data:\n if item:\n result...
{ "task_type": "algorithm", "has_code": true, "tokens_approx": 372 }
explanation_085a933c_1_18
synthetic_coding_dataset_v1
explanation
JavaScript
advanced
[ { "from": "human", "value": "Explain garbage collection in JavaScript." }, { "from": "gpt", "value": "## garbage collection in JavaScript\n\ngarbage collection is essential for modern JS development.\n\n### Core Concepts\n\n1. Execution context\n2. Scope chain\n3. Closures\n\n### Example\n\n```j...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 395 }
code_generation_38f5ad9d_1_19
synthetic_coding_dataset_v1
code_generation
Kotlin
advanced
[ { "from": "human", "value": "Write Kotlin code for implement caching." }, { "from": "gpt", "value": "Here's the Kotlin solution:\n\n```kotlin\nclass Node:\n def __init__(self, val):\n self.val = val\n self.next = None\n def __repr__(self):\n return f'Node({self.val})'\...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 272 }
explanation_48508d16_1_20
synthetic_coding_dataset_v1
explanation
JavaScript
advanced
[ { "from": "human", "value": "Explain closures in JavaScript." }, { "from": "gpt", "value": "## closures in JavaScript\n\nclosures is essential for modern JS development.\n\n### Core Concepts\n\n1. Execution context\n2. Scope chain\n3. Closures\n\n### Example\n\n```javascript\npublic class Servic...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 390 }
code_generation_dd49ffbe_1_21
synthetic_coding_dataset_v1
code_generation
Python
expert
[ { "from": "human", "value": "Write a Python function to process files." }, { "from": "gpt", "value": "Here's the Python solution:\n\n```python\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nThis handles ...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 263 }
code_generation_33da971a_1_22
synthetic_coding_dataset_v1
code_generation
Java
intermediate
[ { "from": "human", "value": "Create a Java class for sort data." }, { "from": "gpt", "value": "Here's the Java class:\n\n```java\nSELECT u.id, COUNT(o.id) as count\nFROM users u\nLEFT JOIN orders o ON u.id = o.user_id\nGROUP BY u.id;\n```\n\nThis follows SOLID principles with proper encapsulatio...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 228 }
design_pattern_34d5b7c9_1_23
synthetic_coding_dataset_v1
design_pattern
Python
advanced
[ { "from": "human", "value": "Explain the singleton pattern in Python." }, { "from": "gpt", "value": "## singleton Pattern\n\nEnsure single instance\n\n### Code\n\n```python\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n...
{ "task_type": "design_pattern", "has_code": true, "tokens_approx": 318 }
algorithm_54fcdc80_1_24
synthetic_coding_dataset_v1
algorithm
Python
advanced
[ { "from": "human", "value": "Implement BFS in Python." }, { "from": "gpt", "value": "## BFS\n\n### Complexity\n- Time: O(V+E)\n- Space: O(V)\n\n### Implementation\n\n```python\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < ...
{ "task_type": "algorithm", "has_code": true, "tokens_approx": 414 }
code_generation_940ca4b1_1_25
synthetic_coding_dataset_v1
code_generation
Rust
intermediate
[ { "from": "human", "value": "Create a Rust solution for handle errors." }, { "from": "gpt", "value": "Here's the Rust implementation:\n\n```rust\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nUses owners...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 252 }
explanation_9267e2b2_1_26
synthetic_coding_dataset_v1
explanation
Python
intermediate
[ { "from": "human", "value": "Explain inheritance in Python." }, { "from": "gpt", "value": "## inheritance\n\ninheritance is fundamental to Python programming.\n\n### How It Works\n\nIt manages state efficiently using:\n1. Encapsulation\n2. Type hints\n3. Error handling\n\n### Example\n\n```pytho...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 421 }
code_generation_1306f4ce_1_27
synthetic_coding_dataset_v1
code_generation
Java
expert
[ { "from": "human", "value": "Create a Java class for implement caching." }, { "from": "gpt", "value": "Here's the Java class:\n\n```java\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n```\n\nThis follows SOLID principles with proper...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 241 }
explanation_995c10b6_1_28
synthetic_coding_dataset_v1
explanation
JavaScript
advanced
[ { "from": "human", "value": "Explain memory management in JavaScript." }, { "from": "gpt", "value": "## memory management in JavaScript\n\nmemory management is essential for modern JS development.\n\n### Core Concepts\n\n1. Execution context\n2. Scope chain\n3. Closures\n\n### Example\n\n```java...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 549 }
code_generation_a4430eb9_1_29
synthetic_coding_dataset_v1
code_generation
C++
advanced
[ { "from": "human", "value": "Write a C++ program to parse JSON data." }, { "from": "gpt", "value": "Here's the C++ implementation:\n\n```cpp\nSELECT u.id, COUNT(o.id) as count\nFROM users u\nLEFT JOIN orders o ON u.id = o.user_id\nGROUP BY u.id;\n```\n\nUses RAII and modern C++ features." } ]
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 218 }
best_practices_bc606da9_1_30
synthetic_coding_dataset_v1
best_practices
JavaScript
intermediate
[ { "from": "human", "value": "Best practices for concurrency in JavaScript?" }, { "from": "gpt", "value": "## concurrency Best Practices in JS\n\n### Guidelines\n1. Use const/let, never var\n2. Async/await over callbacks\n3. Validate all inputs\n4. Handle promise rejections\n5. Use strict mode\n\...
{ "task_type": "best_practices", "has_code": true, "tokens_approx": 484 }
design_pattern_a59ebcbd_1_31
synthetic_coding_dataset_v1
design_pattern
Java
expert
[ { "from": "human", "value": "Explain the observer pattern in Java." }, { "from": "gpt", "value": "## observer Pattern\n\nEvent subscription\n\n### Implementation\n\n```java\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key):\n ...
{ "task_type": "design_pattern", "has_code": true, "tokens_approx": 382 }
code_generation_fae197c7_1_32
synthetic_coding_dataset_v1
code_generation
Ruby
expert
[ { "from": "human", "value": "Implement process files in Ruby." }, { "from": "gpt", "value": "Here's the Ruby solution:\n\n```ruby\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n```\n\nFollows Ruby idiom...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 259 }
algorithm_7292a161_1_33
synthetic_coding_dataset_v1
algorithm
C++
advanced
[ { "from": "human", "value": "Implement merge sort in C++." }, { "from": "gpt", "value": "## merge sort in C++\n\n### Complexity\n- Time: O(n log n)\n- Space: O(n)\n\n### Implementation\n\n```cpp\npublic class Service {\n public Response process(Request req) {\n validate(req);\n ...
{ "task_type": "algorithm", "has_code": true, "tokens_approx": 291 }
refactoring_e66bb3aa_1_34
synthetic_coding_dataset_v1
refactoring
JavaScript
advanced
[ { "from": "human", "value": "Refactor this JavaScript code:\n```\nfunction process(data) { var r = []; for(var i=0; i<data.length; i++) { if(data[i]!=null) { if(data[i].v>10) { r.push(data[i]); } } } return r; }\n```" }, { "from": "gpt", "value": "### Refactored Code\n\n```javascript\nconst proc...
{ "task_type": "refactoring", "has_code": true, "tokens_approx": 367 }
explanation_e6e45bdc_1_35
synthetic_coding_dataset_v1
explanation
JavaScript
beginner
[ { "from": "human", "value": "Explain generics in JavaScript." }, { "from": "gpt", "value": "## generics in JavaScript\n\ngenerics is essential for modern JS development.\n\n### Core Concepts\n\n1. Execution context\n2. Scope chain\n3. Closures\n\n### Example\n\n```javascript\nclass Node:\n de...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 412 }
code_generation_0a12d2bf_1_36
synthetic_coding_dataset_v1
code_generation
TypeScript
advanced
[ { "from": "human", "value": "Write TypeScript code to parse JSON data." }, { "from": "gpt", "value": "Here's the TypeScript implementation:\n\n```typescript\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < pivot]\n mid = [...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 405 }
code_generation_08ae2d01_1_37
synthetic_coding_dataset_v1
code_generation
C#
advanced
[ { "from": "human", "value": "Write C# code to handle errors." }, { "from": "gpt", "value": "Here's the C# implementation:\n\n```csharp\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key):\n return self.data.get(key)\n ...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 324 }
code_generation_dae0835e_1_38
synthetic_coding_dataset_v1
code_generation
PHP
expert
[ { "from": "human", "value": "Create PHP code to validate inputs." }, { "from": "gpt", "value": "Here's the PHP implementation:\n\n```php\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n```\n\nModern PHP with type declarations." } ]
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 219 }
best_practices_491fa2b2_1_39
synthetic_coding_dataset_v1
best_practices
Python
intermediate
[ { "from": "human", "value": "What are best practices for security in Python?" }, { "from": "gpt", "value": "## security Best Practices\n\n### Key Principles\n1. Validate all inputs\n2. Handle errors\n3. Write tests\n4. Document APIs\n5. Use type hints\n\n### Example\n\n```python\nasync function ...
{ "task_type": "best_practices", "has_code": true, "tokens_approx": 440 }
code_generation_15ad5d6c_1_40
synthetic_coding_dataset_v1
code_generation
TypeScript
advanced
[ { "from": "human", "value": "Write TypeScript code to build a REST client." }, { "from": "gpt", "value": "Here's the TypeScript implementation:\n\n```typescript\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n``...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 277 }
code_generation_6d6f8e80_1_41
synthetic_coding_dataset_v1
code_generation
Java
beginner
[ { "from": "human", "value": "Create a Java class for parse JSON data." }, { "from": "gpt", "value": "Here's the Java class:\n\n```java\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nThis follows SOLID pr...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 259 }
explanation_b6509ed9_1_42
synthetic_coding_dataset_v1
explanation
Python
advanced
[ { "from": "human", "value": "Explain error handling in Python." }, { "from": "gpt", "value": "## error handling\n\nerror handling is fundamental to Python programming.\n\n### How It Works\n\nIt manages state efficiently using:\n1. Encapsulation\n2. Type hints\n3. Error handling\n\n### Example\n\...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 562 }
code_generation_a6e0a5d7_1_43
synthetic_coding_dataset_v1
code_generation
Swift
advanced
[ { "from": "human", "value": "Implement parse JSON data in Swift." }, { "from": "gpt", "value": "Here's the Swift implementation:\n\n```swift\nSELECT u.id, COUNT(o.id) as count\nFROM users u\nLEFT JOIN orders o ON u.id = o.user_id\nGROUP BY u.id;\n```\n\nUses optionals and protocol-oriented desig...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 228 }
code_generation_a76d7e87_1_44
synthetic_coding_dataset_v1
code_generation
Rust
intermediate
[ { "from": "human", "value": "Create a Rust solution for search efficiently." }, { "from": "gpt", "value": "Here's the Rust implementation:\n\n```rust\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n```\n\nUses ownership and borrowing...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 237 }
code_generation_5d33c339_1_45
synthetic_coding_dataset_v1
code_generation
C#
advanced
[ { "from": "human", "value": "Write C# code to validate inputs." }, { "from": "gpt", "value": "Here's the C# implementation:\n\n```csharp\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nUses async/await an...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 240 }
code_generation_3d36d1ba_1_46
synthetic_coding_dataset_v1
code_generation
Python
advanced
[ { "from": "human", "value": "Write a Python function to validate inputs." }, { "from": "gpt", "value": "Here's the Python solution:\n\n```python\ndef process_data(data):\n results = []\n for item in data:\n if item:\n results.append(transform(item))\n return results\n\...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 333 }
code_generation_3e1b40be_1_47
synthetic_coding_dataset_v1
code_generation
Kotlin
expert
[ { "from": "human", "value": "Write Kotlin code for validate inputs." }, { "from": "gpt", "value": "Here's the Kotlin solution:\n\n```kotlin\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n```\n\nUses coroutines and extension function...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 228 }
algorithm_f5d3dbb4_1_48
synthetic_coding_dataset_v1
algorithm
Python
advanced
[ { "from": "human", "value": "Implement merge sort in Python." }, { "from": "gpt", "value": "## merge sort\n\n### Complexity\n- Time: O(n log n)\n- Space: O(n)\n\n### Implementation\n\n```python\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error(...
{ "task_type": "algorithm", "has_code": true, "tokens_approx": 306 }
data_structure_a02b5fef_1_49
synthetic_coding_dataset_v1
data_structure
Java
beginner
[ { "from": "human", "value": "Implement a dynamic array in Java." }, { "from": "gpt", "value": "## dynamic array in Java\n\n### Core Operations\n| Operation | Time | Description |\n|-----------|------|-------------|\n| add | O(1) | Insert element |\n| remove | O(1) | Delete element |\n| contains ...
{ "task_type": "data_structure", "has_code": true, "tokens_approx": 483 }
design_pattern_a1236282_1_50
synthetic_coding_dataset_v1
design_pattern
Python
advanced
[ { "from": "human", "value": "Explain the adapter pattern in Python." }, { "from": "gpt", "value": "## adapter Pattern\n\nInterface compatibility\n\n### Code\n\n```python\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key):\n ...
{ "task_type": "design_pattern", "has_code": true, "tokens_approx": 400 }
code_generation_d80d2001_1_51
synthetic_coding_dataset_v1
code_generation
Java
expert
[ { "from": "human", "value": "Create a Java class for handle errors." }, { "from": "gpt", "value": "Here's the Java class:\n\n```java\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n```\n\nThis follows SOLID principles with proper enc...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 237 }
code_generation_6b60240e_1_52
synthetic_coding_dataset_v1
code_generation
Go
beginner
[ { "from": "human", "value": "Implement create a queue in Go." }, { "from": "gpt", "value": "Here's the Go solution:\n\n```go\nclass Node:\n def __init__(self, val):\n self.val = val\n self.next = None\n def __repr__(self):\n return f'Node({self.val})'\n```\n\nFollows G...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 258 }
explanation_b95f526a_1_53
synthetic_coding_dataset_v1
explanation
Python
advanced
[ { "from": "human", "value": "Explain garbage collection in Python." }, { "from": "gpt", "value": "## garbage collection\n\ngarbage collection is fundamental to Python programming.\n\n### How It Works\n\nIt manages state efficiently using:\n1. Encapsulation\n2. Type hints\n3. Error handling\n\n##...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 510 }
code_generation_51a56c97_1_54
synthetic_coding_dataset_v1
code_generation
Swift
intermediate
[ { "from": "human", "value": "Implement search efficiently in Swift." }, { "from": "gpt", "value": "Here's the Swift implementation:\n\n```swift\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n```\n\nUses...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 265 }
best_practices_06b56049_1_55
synthetic_coding_dataset_v1
best_practices
JavaScript
beginner
[ { "from": "human", "value": "Best practices for error handling in JavaScript?" }, { "from": "gpt", "value": "## error handling Best Practices in JS\n\n### Guidelines\n1. Use const/let, never var\n2. Async/await over callbacks\n3. Validate all inputs\n4. Handle promise rejections\n5. Use strict m...
{ "task_type": "best_practices", "has_code": true, "tokens_approx": 600 }
code_generation_0259615d_1_56
synthetic_coding_dataset_v1
code_generation
Java
advanced
[ { "from": "human", "value": "Create a Java class for process files." }, { "from": "gpt", "value": "Here's the Java class:\n\n```java\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nThis follows SOLID prin...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 257 }
code_generation_6aee9783_1_57
synthetic_coding_dataset_v1
code_generation
C#
expert
[ { "from": "human", "value": "Write C# code to search efficiently." }, { "from": "gpt", "value": "Here's the C# implementation:\n\n```csharp\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key):\n return self.data.get(key)\...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 329 }
code_generation_fbbe7872_1_58
synthetic_coding_dataset_v1
code_generation
C#
advanced
[ { "from": "human", "value": "Write C# code to process files." }, { "from": "gpt", "value": "Here's the C# implementation:\n\n```csharp\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < pivot]\n mid = [x for x in arr if x ==...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 370 }
code_generation_68b7a628_1_59
synthetic_coding_dataset_v1
code_generation
C#
beginner
[ { "from": "human", "value": "Write C# code to sort data." }, { "from": "gpt", "value": "Here's the C# implementation:\n\n```csharp\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key):\n return self.data.get(key)\n def ...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 320 }
code_generation_273ca32b_1_60
synthetic_coding_dataset_v1
code_generation
C#
beginner
[ { "from": "human", "value": "Write C# code to manage state." }, { "from": "gpt", "value": "Here's the C# implementation:\n\n```csharp\ndef process_data(data):\n results = []\n for item in data:\n if item:\n results.append(transform(item))\n return results\n\ndef transf...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 305 }
code_generation_4e4a0e4e_1_61
synthetic_coding_dataset_v1
code_generation
Ruby
expert
[ { "from": "human", "value": "Implement validate inputs in Ruby." }, { "from": "gpt", "value": "Here's the Ruby solution:\n\n```ruby\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n```\n\nFollows Ruby idi...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 261 }
explanation_309bf189_1_62
synthetic_coding_dataset_v1
explanation
JavaScript
intermediate
[ { "from": "human", "value": "Explain type systems in JavaScript." }, { "from": "gpt", "value": "## type systems in JavaScript\n\ntype systems is essential for modern JS development.\n\n### Core Concepts\n\n1. Execution context\n2. Scope chain\n3. Closures\n\n### Example\n\n```javascript\nasync f...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 411 }
explanation_0f93dc1b_1_63
synthetic_coding_dataset_v1
explanation
JavaScript
advanced
[ { "from": "human", "value": "Explain error handling in JavaScript." }, { "from": "gpt", "value": "## error handling in JavaScript\n\nerror handling is essential for modern JS development.\n\n### Core Concepts\n\n1. Execution context\n2. Scope chain\n3. Closures\n\n### Example\n\n```javascript\nd...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 476 }
algorithm_6f428c7a_1_64
synthetic_coding_dataset_v1
algorithm
Python
expert
[ { "from": "human", "value": "Implement quicksort in Python." }, { "from": "gpt", "value": "## quicksort\n\n### Complexity\n- Time: O(n log n)\n- Space: O(log n)\n\n### Implementation\n\n```python\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n ...
{ "task_type": "algorithm", "has_code": true, "tokens_approx": 395 }
code_generation_335dc835_1_65
synthetic_coding_dataset_v1
code_generation
C#
beginner
[ { "from": "human", "value": "Write C# code to parse JSON data." }, { "from": "gpt", "value": "Here's the C# implementation:\n\n```csharp\ndef process_data(data):\n results = []\n for item in data:\n if item:\n results.append(transform(item))\n return results\n\ndef tra...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 308 }
code_generation_ce068e1c_1_66
synthetic_coding_dataset_v1
code_generation
PHP
advanced
[ { "from": "human", "value": "Create PHP code to build a REST client." }, { "from": "gpt", "value": "Here's the PHP implementation:\n\n```php\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n```\n\nModern ...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 252 }
code_generation_892256c9_1_67
synthetic_coding_dataset_v1
code_generation
C++
beginner
[ { "from": "human", "value": "Write a C++ program to validate inputs." }, { "from": "gpt", "value": "Here's the C++ implementation:\n\n```cpp\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nUses RAII and m...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 243 }
data_structure_b98f92e5_1_68
synthetic_coding_dataset_v1
data_structure
Python
intermediate
[ { "from": "human", "value": "Implement a hash table in Python." }, { "from": "gpt", "value": "## hash table\n\n### Operations\n| Operation | Time | Description |\n|-----------|------|-------------|\n| Insert | O(1) | Add element |\n| Delete | O(1) | Remove element |\n| Search | O(n) | Find eleme...
{ "task_type": "data_structure", "has_code": true, "tokens_approx": 566 }
code_generation_ad7127c1_1_69
synthetic_coding_dataset_v1
code_generation
Java
expert
[ { "from": "human", "value": "Create a Java class for build a REST client." }, { "from": "gpt", "value": "Here's the Java class:\n\n```java\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n```\n\nThis foll...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 272 }
data_structure_9cb15b92_1_70
synthetic_coding_dataset_v1
data_structure
Python
advanced
[ { "from": "human", "value": "Implement a queue in Python." }, { "from": "gpt", "value": "## queue\n\n### Operations\n| Operation | Time | Description |\n|-----------|------|-------------|\n| Insert | O(1) | Add element |\n| Delete | O(1) | Remove element |\n| Search | O(n) | Find element |\n\n##...
{ "task_type": "data_structure", "has_code": true, "tokens_approx": 479 }
code_generation_714c07a0_1_71
synthetic_coding_dataset_v1
code_generation
Python
advanced
[ { "from": "human", "value": "Write a Python function to implement caching." }, { "from": "gpt", "value": "Here's the Python solution:\n\n```python\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n```\n\nT...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 276 }
data_structure_f5e900cc_1_72
synthetic_coding_dataset_v1
data_structure
Python
advanced
[ { "from": "human", "value": "Implement a linked list in Python." }, { "from": "gpt", "value": "## linked list\n\n### Operations\n| Operation | Time | Description |\n|-----------|------|-------------|\n| Insert | O(1) | Add element |\n| Delete | O(1) | Remove element |\n| Search | O(n) | Find ele...
{ "task_type": "data_structure", "has_code": true, "tokens_approx": 457 }
code_generation_f07b40a0_1_73
synthetic_coding_dataset_v1
code_generation
C++
intermediate
[ { "from": "human", "value": "Write a C++ program to search efficiently." }, { "from": "gpt", "value": "Here's the C++ implementation:\n\n```cpp\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nUses RAII an...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 246 }
code_generation_e185f8d9_1_74
synthetic_coding_dataset_v1
code_generation
PHP
intermediate
[ { "from": "human", "value": "Create PHP code to search efficiently." }, { "from": "gpt", "value": "Here's the PHP implementation:\n\n```php\nclass Node:\n def __init__(self, val):\n self.val = val\n self.next = None\n def __repr__(self):\n return f'Node({self.val})'\n`...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 264 }
code_generation_a3f559ff_1_75
synthetic_coding_dataset_v1
code_generation
Rust
advanced
[ { "from": "human", "value": "Create a Rust solution for process files." }, { "from": "gpt", "value": "Here's the Rust implementation:\n\n```rust\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < pivot]\n mid = [x for x in a...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 384 }
code_generation_c28b1816_1_76
synthetic_coding_dataset_v1
code_generation
TypeScript
intermediate
[ { "from": "human", "value": "Write TypeScript code to handle errors." }, { "from": "gpt", "value": "Here's the TypeScript implementation:\n\n```typescript\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nI...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 271 }
code_generation_c97b5ac8_1_77
synthetic_coding_dataset_v1
code_generation
JavaScript
beginner
[ { "from": "human", "value": "Implement parse JSON data in JavaScript." }, { "from": "gpt", "value": "Here's the JavaScript implementation:\n\n```javascript\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < pivot]\n mid = [x...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 412 }
design_pattern_7afa3076_1_78
synthetic_coding_dataset_v1
design_pattern
Python
advanced
[ { "from": "human", "value": "Explain the factory pattern in Python." }, { "from": "gpt", "value": "## factory Pattern\n\nCreate objects flexibly\n\n### Code\n\n```python\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return r...
{ "task_type": "design_pattern", "has_code": true, "tokens_approx": 323 }
code_generation_d8e81f14_1_79
synthetic_coding_dataset_v1
code_generation
Rust
advanced
[ { "from": "human", "value": "Create a Rust solution for sort data." }, { "from": "gpt", "value": "Here's the Rust implementation:\n\n```rust\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nUses ownership ...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 248 }
code_generation_abbd38a5_1_80
synthetic_coding_dataset_v1
code_generation
PHP
advanced
[ { "from": "human", "value": "Create PHP code to handle errors." }, { "from": "gpt", "value": "Here's the PHP implementation:\n\n```php\npublic class Service {\n public Response process(Request req) {\n validate(req);\n return execute(req);\n }\n}\n```\n\nModern PHP with type ...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 237 }
code_generation_d2a184e1_1_81
synthetic_coding_dataset_v1
code_generation
JavaScript
intermediate
[ { "from": "human", "value": "Implement manage state in JavaScript." }, { "from": "gpt", "value": "Here's the JavaScript implementation:\n\n```javascript\nasync function fetchData(url) {\n const res = await fetch(url);\n if (!res.ok) throw new Error('Failed');\n return res.json();\n}\n``...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 286 }
code_generation_c6b156bb_1_82
synthetic_coding_dataset_v1
code_generation
Ruby
intermediate
[ { "from": "human", "value": "Implement handle errors in Ruby." }, { "from": "gpt", "value": "Here's the Ruby solution:\n\n```ruby\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n```\n\nFollows Ruby idioms with blocks and metaprogramm...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 230 }
code_generation_2524f10d_1_83
synthetic_coding_dataset_v1
code_generation
Python
advanced
[ { "from": "human", "value": "Write a Python function to parse JSON data." }, { "from": "gpt", "value": "Here's the Python solution:\n\n```python\nclass Node:\n def __init__(self, val):\n self.val = val\n self.next = None\n def __repr__(self):\n return f'Node({self.val}...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 287 }
system_design_0837894d_1_84
synthetic_coding_dataset_v1
system_design
multiple
beginner
[ { "from": "human", "value": "Design a URL shortener for global deployment." }, { "from": "gpt", "value": "## URL shortener Design\n\n### Architecture\n```\n[Clients] → [LB] → [API Gateway] → [Services] → [DB]\n```\n\n### Components\n1. Load Balancer - traffic distribution\n2. API Gateway - auth,...
{ "task_type": "system_design", "has_code": true, "tokens_approx": 535 }
algorithm_cc820a1d_1_85
synthetic_coding_dataset_v1
algorithm
Python
expert
[ { "from": "human", "value": "Implement binary search in Python." }, { "from": "gpt", "value": "## binary search\n\n### Complexity\n- Time: O(log n)\n- Space: O(1)\n\n### Implementation\n\n```python\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process...
{ "task_type": "algorithm", "has_code": true, "tokens_approx": 290 }
system_design_379b6a74_1_86
synthetic_coding_dataset_v1
system_design
multiple
beginner
[ { "from": "human", "value": "Design a social media feed for 1M users." }, { "from": "gpt", "value": "## social media feed Design\n\n### Architecture\n```\n[Clients] → [LB] → [API Gateway] → [Services] → [DB]\n```\n\n### Components\n1. Load Balancer - traffic distribution\n2. API Gateway - auth, ...
{ "task_type": "system_design", "has_code": true, "tokens_approx": 534 }
design_pattern_3605730e_1_87
synthetic_coding_dataset_v1
design_pattern
Python
beginner
[ { "from": "human", "value": "Explain the observer pattern in Python." }, { "from": "gpt", "value": "## observer Pattern\n\nEvent subscription\n\n### Code\n\n```python\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key):\n ...
{ "task_type": "design_pattern", "has_code": true, "tokens_approx": 393 }
code_generation_bff5ea77_1_88
synthetic_coding_dataset_v1
code_generation
C++
intermediate
[ { "from": "human", "value": "Write a C++ program to process files." }, { "from": "gpt", "value": "Here's the C++ implementation:\n\n```cpp\ndef quicksort(arr):\n if len(arr) <= 1: return arr\n pivot = arr[len(arr)//2]\n left = [x for x in arr if x < pivot]\n mid = [x for x in arr if ...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 373 }
code_generation_1bc82ef7_1_89
synthetic_coding_dataset_v1
code_generation
Swift
beginner
[ { "from": "human", "value": "Implement handle errors in Swift." }, { "from": "gpt", "value": "Here's the Swift implementation:\n\n```swift\ndef process_data(data):\n results = []\n for item in data:\n if item:\n results.append(transform(item))\n return results\n\ndef t...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 319 }
code_generation_01235796_1_90
synthetic_coding_dataset_v1
code_generation
PHP
advanced
[ { "from": "human", "value": "Create PHP code to create a queue." }, { "from": "gpt", "value": "Here's the PHP implementation:\n\n```php\ndef process_data(data):\n results = []\n for item in data:\n if item:\n results.append(transform(item))\n return results\n\ndef tran...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 306 }
code_generation_0401c0bb_1_91
synthetic_coding_dataset_v1
code_generation
Go
intermediate
[ { "from": "human", "value": "Implement sort data in Go." }, { "from": "gpt", "value": "Here's the Go solution:\n\n```go\nSELECT u.id, COUNT(o.id) as count\nFROM users u\nLEFT JOIN orders o ON u.id = o.user_id\nGROUP BY u.id;\n```\n\nFollows Go conventions with error handling." } ]
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 206 }
data_structure_4c794ce3_1_92
synthetic_coding_dataset_v1
data_structure
Java
intermediate
[ { "from": "human", "value": "Implement a graph in Java." }, { "from": "gpt", "value": "## graph in Java\n\n### Core Operations\n| Operation | Time | Description |\n|-----------|------|-------------|\n| add | O(1) | Insert element |\n| remove | O(1) | Delete element |\n| contains | O(n) | Check e...
{ "task_type": "data_structure", "has_code": true, "tokens_approx": 462 }
data_structure_ed730f90_1_93
synthetic_coding_dataset_v1
data_structure
Java
expert
[ { "from": "human", "value": "Implement a linked list in Java." }, { "from": "gpt", "value": "## linked list in Java\n\n### Core Operations\n| Operation | Time | Description |\n|-----------|------|-------------|\n| add | O(1) | Insert element |\n| remove | O(1) | Delete element |\n| contains | O(...
{ "task_type": "data_structure", "has_code": true, "tokens_approx": 474 }
best_practices_85bfa763_1_94
synthetic_coding_dataset_v1
best_practices
Python
intermediate
[ { "from": "human", "value": "What are best practices for error handling in Python?" }, { "from": "gpt", "value": "## error handling Best Practices\n\n### Key Principles\n1. Validate all inputs\n2. Handle errors\n3. Write tests\n4. Document APIs\n5. Use type hints\n\n### Example\n\n```python\nasy...
{ "task_type": "best_practices", "has_code": true, "tokens_approx": 452 }
algorithm_c7099788_1_95
synthetic_coding_dataset_v1
algorithm
Java
intermediate
[ { "from": "human", "value": "Implement Dijkstra in Java." }, { "from": "gpt", "value": "## Dijkstra in Java\n\n### Analysis\n- Time: O((V+E)log V)\n- Space: O(V)\n\n### Code\n\n```java\nfunc handleRequest(w http.ResponseWriter, r *http.Request) {\n ctx := r.Context()\n process(ctx, r)\n}\n...
{ "task_type": "algorithm", "has_code": true, "tokens_approx": 275 }
code_generation_5cd80488_1_96
synthetic_coding_dataset_v1
code_generation
Python
advanced
[ { "from": "human", "value": "Write a Python function to sort data." }, { "from": "gpt", "value": "Here's the Python solution:\n\n```python\nclass Cache:\n def __init__(self, ttl=300):\n self.ttl = ttl\n self.data = {}\n def get(self, key):\n return self.data.get(key)\n...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 345 }
code_generation_652a60b4_1_97
synthetic_coding_dataset_v1
code_generation
Ruby
advanced
[ { "from": "human", "value": "Implement create a queue in Ruby." }, { "from": "gpt", "value": "Here's the Ruby solution:\n\n```ruby\nclass Node:\n def __init__(self, val):\n self.val = val\n self.next = None\n def __repr__(self):\n return f'Node({self.val})'\n```\n\nFol...
{ "task_type": "code_generation", "has_code": true, "tokens_approx": 273 }
data_structure_8155988c_1_98
synthetic_coding_dataset_v1
data_structure
Python
intermediate
[ { "from": "human", "value": "Implement a stack in Python." }, { "from": "gpt", "value": "## stack\n\n### Operations\n| Operation | Time | Description |\n|-----------|------|-------------|\n| Insert | O(1) | Add element |\n| Delete | O(1) | Remove element |\n| Search | O(n) | Find element |\n\n##...
{ "task_type": "data_structure", "has_code": true, "tokens_approx": 556 }
explanation_04e50252_1_99
synthetic_coding_dataset_v1
explanation
Python
beginner
[ { "from": "human", "value": "Explain memory management in Python." }, { "from": "gpt", "value": "## memory management\n\nmemory management is fundamental to Python programming.\n\n### How It Works\n\nIt manages state efficiently using:\n1. Encapsulation\n2. Type hints\n3. Error handling\n\n### E...
{ "task_type": "explanation", "has_code": true, "tokens_approx": 414 }
End of preview.

Synthetic Coding Dataset v1

A large-scale synthetic coding dataset designed for training and fine-tuning 2B parameter language models. Contains **1.5M instruction-response pairs** spanning 22 programming languages and 10 task categories, formatted in the ShareGPT/Alpaca hybrid conversation schema.

Dataset Summary

Property Value
Total Entries ~1,500,000
Total Size ~4.48 GB
Format JSONL (63 part files)
Schema ShareGPT/Alpaca hybrid (conversations array)
Languages 22 programming languages
Task Categories 10 types
Difficulty Levels 4 (beginner to expert)
Generated 2026-06-22

Supported Languages

Python, JavaScript, TypeScript, Java, C++, Go, Rust, C#, Ruby, PHP, Kotlin, Swift, Scala, C, Lua, Julia, Elixir, Haskell, OCaml, Dart, R, Bash

Task Categories

Category Description
code_generation Write functions, classes, and complete programs
debugging Find and fix bugs in existing code
explanation Explain programming concepts and code behavior
refactoring Improve code quality, readability, and structure
algorithm Implement classic and advanced algorithms
system_design Design scalable systems and architectures
code_review Review and critique code for issues
best_practices Language-specific idioms and best practices
design_pattern Explain and implement design patterns
data_structure Implement and manipulate data structures

Difficulty Levels

  • beginner — Basic syntax, simple loops, conditionals, and introductory concepts
  • intermediate — Standard design patterns, common algorithms, and typical development tasks
  • advanced — Complex algorithms, performance optimization, and non-trivial problem solving
  • expert — System design, architecture decisions, and large-scale engineering challenges

Data Format

Each line in the JSONL files is a JSON object with the following structure:

{
  "id": "unique_identifier",
  "source": "synthetic_coding_dataset_v1",
  "category": "code_generation",
  "language": "Python",
  "difficulty": "intermediate",
  "conversations": [
    {"from": "human", "value": "Write a function that..."},
    {"from": "gpt", "value": "Here is the implementation..."}
  ],
  "metadata": {
    "task_type": "code_generation",
    "has_code": true,
    "tokens_approx": 1234
  }
}

Field Descriptions

Field Type Description
id string Unique identifier for the entry
source string Dataset source identifier (always synthetic_coding_dataset_v1)
category string One of the 10 task categories listed above
language string Programming language for the task
difficulty string One of: beginner, intermediate, advanced, expert
conversations array Array of message objects with from (human/gpt) and value fields
metadata.task_type string Mirrors the category field
metadata.has_code boolean Whether the response contains code blocks
metadata.tokens_approx integer Approximate token count for the entry

Dataset Structure

The dataset is distributed as 63 JSONL part files:

data/
├── coding_dataset_part_001.jsonl
├── coding_dataset_part_002.jsonl
├── ...
└── coding_dataset_part_063.jsonl

Note: Two part files (043 and 050) are empty (0 bytes) and can be safely ignored.

Usage

Loading with Hugging Face Datasets

from datasets import load_dataset

dataset = load_dataset("your-username/synthetic_coding_dataset_v1", split="train")
print(dataset[0])

Loading Manually

import json

entries = []
for i in range(1, 64):
    filepath = f"data/coding_dataset_part_{i:03d}.jsonl"
    try:
        with open(filepath, "r", encoding="utf-8") as f:
            for line in f:
                line = line.strip()
                if line:
                    entries.append(json.loads(line))
    except FileNotFoundError:
        continue

print(f"Loaded {len(entries)} entries")

Filtering by Language or Category

# Filter Python entries
python_entries = [e for e in dataset if e["language"] == "Python"]

# Filter debugging tasks at advanced level
debugging_advanced = [
    e for e in dataset
    if e["category"] == "debugging" and e["difficulty"] == "advanced"
]

Intended Use

This dataset is designed for:

  • Instruction tuning of code-generation language models in the ~2B parameter range
  • Fine-tuning existing base models for coding tasks
  • Research on multi-language code understanding and generation
  • Benchmarking code model performance across languages and difficulty levels

Limitations

  • This is a synthetically generated dataset. While it covers a broad range of coding tasks, it may not fully represent the complexity and nuance of real-world developer interactions or production codebases.
  • The responses are generated by an AI model and may occasionally contain suboptimal solutions, outdated APIs, or minor inaccuracies.
  • The dataset has not been manually verified at scale; users are encouraged to perform their own quality filtering based on their specific requirements.

License

This dataset is released under the MIT license.

Acknowledgements

Generated using large language models for synthetic data creation. Designed to support open-source code model training and research.

Downloads last month
-