initial upload
Browse files- README.md +66 -0
- python-qa-stackoverflow.parquet +3 -0
README.md
CHANGED
|
@@ -1,3 +1,69 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
license: cc-by-sa-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
license: cc-by-sa-4.0
|
| 5 |
+
tags:
|
| 6 |
+
- python
|
| 7 |
+
- stackoverflow
|
| 8 |
+
- question-answering
|
| 9 |
+
- instruct
|
| 10 |
+
size_categories:
|
| 11 |
+
- 1K<n<10K
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
# StackOverflow Python QA Dataset
|
| 15 |
+
|
| 16 |
+
[](https://github.com/meeAtif)
|
| 17 |
+
[](https://creativecommons.org/licenses/by-sa/4.0/)
|
| 18 |
+
|
| 19 |
+
## Description
|
| 20 |
+
|
| 21 |
+
This dataset contains high-quality Python questions and answers scraped from StackOverflow. It is designed for instruct-tuning Large Language Models (LLMs) or for question-answering tasks.
|
| 22 |
+
|
| 23 |
+
- **Source**: StackOverflow
|
| 24 |
+
- **Selection Criteria**:
|
| 25 |
+
- Tag: `python`
|
| 26 |
+
- Score: > 10
|
| 27 |
+
- Must have an **accepted answer**
|
| 28 |
+
- **Content**: Pairs of instructions (Question) and outputs (Accepted Answer).
|
| 29 |
+
|
| 30 |
+
## Dataset Structure
|
| 31 |
+
|
| 32 |
+
The dataset consists of the following fields:
|
| 33 |
+
|
| 34 |
+
- `question_id`: The unique identifier for the question on StackOverflow.
|
| 35 |
+
- `score`: The vote score of the question.
|
| 36 |
+
- `tags`: A list of tags associated with the question.
|
| 37 |
+
- `creation_date`: The timestamp of when the question was asked.
|
| 38 |
+
- `instruction`: The full question title and body, cleaned of HTML.
|
| 39 |
+
- `output`: The full body of the accepted answer, cleaned of HTML.
|
| 40 |
+
|
| 41 |
+
## Sample Entry
|
| 42 |
+
|
| 43 |
+
```json
|
| 44 |
+
{
|
| 45 |
+
"question_id": 12345,
|
| 46 |
+
"score": 50,
|
| 47 |
+
"tags": ["python", "list-comprehension"],
|
| 48 |
+
"instruction": "How do I create a list... \n\n I have a loop that...",
|
| 49 |
+
"output": "You can use a list comprehension:\n\n [x for x in iterable]"
|
| 50 |
+
}
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
## Usage
|
| 54 |
+
|
| 55 |
+
```python
|
| 56 |
+
from datasets import load_dataset
|
| 57 |
+
|
| 58 |
+
dataset = load_dataset("meeAtif/stackoverflow-python-qa")
|
| 59 |
+
print(dataset['train'][0])
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
## Author
|
| 63 |
+
|
| 64 |
+
[](https://github.com/meeAtif)
|
| 65 |
+
[](https://linkedin.com/in/meAtif)
|
| 66 |
+
[](mailto:iatif@proton.me)
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
*Created by [Atif](https://github.com/meeAtif)*
|
python-qa-stackoverflow.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:12af5f62f367356edfc8b360e5373c0f0f5354f4e3d80d71243991acd87f4f8c
|
| 3 |
+
size 3043637
|