|
Download sys/sys-0029.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.7 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/1c6bb525d6b4b9cdb15d2a75d54734eb29bbb8cb/sys/sys-0029.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@1c6bb525d6b4b9cdb15d2a75d54734eb29bbb8cb/sys/sys-0029.jsonl
-
curl -L -o sys-0029.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/1c6bb525d6b4b9cdb15d2a75d54734eb29bbb8cb/sys/sys-0029.jsonl
1.7 kB
| {"type": "session", "harness": "deepseek-harness", "id": "sys-0029", "name": "Linux system calls"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}} | |
| {"type": "message", "message": {"role": "user", "content": "How do Linux system calls work?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "```c\n#include <unistd.h>\n#include <sys/syscall.h>\n#include <fcntl.h>\n#include <sys/mman.h>\n\n// Direct syscall\nlong result = syscall(SYS_getpid);\n\n// File I/O\nint fd = open(\"/etc/passwd\", O_RDONLY);\nchar buf[4096];\nssize_t n = read(fd, buf, sizeof(buf));\nclose(fd);\n\n// Process\npid_t pid = fork();\nif (pid == 0) {\n execl(\"/bin/ls\", \"ls\", \"-la\", NULL);\n} else {\n int status;\n waitpid(pid, &status, 0);\n}\n\n// Memory mapping\nvoid *p = mmap(NULL, 4096, PROT_READ | PROT_WRITE,\n MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\np[0] = 'A';\nmunmap(p, 4096);\n\n// Pipes\nint pipefd[2];\npipe(pipefd);\nif (fork() == 0) {\n close(pipefd[0]);\n write(pipefd[1], \"hello\", 5);\n close(pipefd[1]);\n} else {\n close(pipefd[1]);\n char buf[10];\n read(pipefd[0], buf, sizeof(buf));\n close(pipefd[0]);\n}\n\n// strace to see syscalls\nstrace -e trace=file ./myprogram\nstrace -e trace=network ./myprogram\nstrace -c ./myprogram # summary\n```"}} | |