Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
conversations
listlengths
2
2
[ { "from": "human", "value": "Design a system that can handle a large number of concurrent requests to a database, ensuring that the data remains consistent and up-to-date. The system should be able to handle a minimum of 1000 requests per second." }, { "from": "gpt", "value": "<think>\nOkay, so ...
[ { "from": "human", "value": "Management wants us to switch to Infragistics, with the added complexity of integrating it with our existing infrastructure and ensuring seamless migration." }, { "from": "gpt", "value": "<think>\nOkay, so management wants us to switch to Infragistics. Hmm, I need to...
[ { "from": "human", "value": "Implement a function that can find the maximum sum of a subarray within a given array. The function should take the array as input and return the maximum sum." }, { "from": "gpt", "value": "<think>\nOkay, I need to implement a function that finds the maximum sum of a...
[ { "from": "human", "value": "Resolve a RuntimeError when running a PyTorch model, considering cases where the error occurs due to inconsistent tensor shapes or types." }, { "from": "gpt", "value": "<think>\nOkay, so I need to figure out how to resolve a RuntimeError in PyTorch that's caused by i...
[ { "from": "human", "value": "Implement a function that generates a Linux shell script to list all the environment variables and their values, handling variable expansion and quoting." }, { "from": "gpt", "value": "<think>\nOkay, I need to create a shell script that lists all environment variable...
[ { "from": "human", "value": "Optimize the code for performance and readability." }, { "from": "gpt", "value": "<think>\nOkay, let me try to figure out how to optimize this code for both performance and readability. The user didn't provide specific code, so maybe they want general advice? Hmm, bu...
[ { "from": "human", "value": "How can I implement a function that displays all the prime numbers between two given numbers? However, the range is very large and needs to be optimized for performance." }, { "from": "gpt", "value": "<think>\nOkay, so I need to write a function that finds all prime ...
[ { "from": "human", "value": "Write a program that can generate a random letter in Python, considering the frequency of each letter in the English language. Implement a function that can take a string of letters as input and return a random letter based on its frequency." }, { "from": "gpt", "val...
[ { "from": "human", "value": "How can I develop a program that takes a 2D Matrix and returns a list of the elements in spiral order, but also handle cases where the matrix is empty or has a non-rectangular shape?" }, { "from": "gpt", "value": "<think>\nOkay, so I need to write a program that take...
[ { "from": "human", "value": "Construct a serverless microservices framework utilizing AWS Lambda, and incorporate it with AWS DynamoDB to facilitate real-time data processing, offline functionalities, and synchronization of user-centric data, with a focus on scalability and resilience." }, { "from":...
[ { "from": "human", "value": "How can you create a custom Bash tool that outputs to stderr instead of stdout and handles errors and exceptions robustly?" }, { "from": "gpt", "value": "<think>\nOkay, I need to create a custom Bash tool that outputs to stderr instead of stdout and handles errors an...
[ { "from": "human", "value": "Can you provide a Java program that can display the ASCII values for all lowercase letters, while also handling non-ASCII characters and edge cases, and providing a user-friendly interface?" }, { "from": "gpt", "value": "<think>\nOkay, I need to write a Java program ...
End of preview. Expand in Data Studio
import json
from tqdm import tqdm
from datasets import load_dataset
import pandas as pd


# Example usage:
dataset = load_dataset("sequelbox/Tachibana2-DeepSeek-R1-PREVIEW")["train"]
dataset = dataset.shuffle(seed=42)
output_file = "./sequelbox_Tachibana2-DeepSeek-R1-PREVIEW-Shuffled-ShareGPT.parquet"

data = []
for item in tqdm(dataset):
    if item["prompt"].strip() == "" or item["response"].strip() == "":
        continue

    data.append(
        {
            "conversations": [
                {
                    "from": "human",
                    "value": item["prompt"].replace("\r\n", "\n").replace("\\n", "\n").strip()
                },
                {
                    "from": "gpt",
                    "value": item["response"].replace("\r\n", "\n").replace("\\n", "\n").strip()
                }
            ]
        }
    )

df = pd.DataFrame(data)
df.to_parquet(
    output_file,
    index=False,
    compression="brotli"
)
Downloads last month
12