Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# Rust Code Dataset
|
3 |
+
|
4 |
+
## Dataset Description
|
5 |
+
|
6 |
+
This dataset contains Rust functions with their documentation comments extracted from GitHub repositories.
|
7 |
+
|
8 |
+
### Features
|
9 |
+
|
10 |
+
- `code`: The Rust function code
|
11 |
+
- `docstring`: Documentation comment for the function
|
12 |
+
- `func_name`: Function name
|
13 |
+
- `language`: Programming language (always "rust")
|
14 |
+
- `repo`: Source repository name
|
15 |
+
- `path`: File path within the repository
|
16 |
+
- `url`: GitHub URL to the source file
|
17 |
+
- `license`: License of the source code
|
18 |
+
|
19 |
+
## Dataset Structure
|
20 |
+
|
21 |
+
The dataset contains the following splits:
|
22 |
+
|
23 |
+
- train: 858128 examples
|
24 |
+
- validation: 13376 examples
|
25 |
+
- test: 18051 examples
|
26 |
+
|
27 |
+
## Usage
|
28 |
+
|
29 |
+
```python
|
30 |
+
from datasets import load_dataset
|
31 |
+
|
32 |
+
# Load the dataset
|
33 |
+
dataset = load_dataset("USERNAME/DATASET_NAME")
|
34 |
+
|
35 |
+
# Access the training split
|
36 |
+
train_data = dataset["train"]
|
37 |
+
|
38 |
+
# Example: Print the first sample
|
39 |
+
print(train_data[0])
|
40 |
+
```
|
41 |
+
|
42 |
+
## Source
|
43 |
+
|
44 |
+
This dataset was created by scraping Rust code from GitHub repositories. Each function includes its documentation comment and license information.
|
45 |
+
|
46 |
+
## License
|
47 |
+
|
48 |
+
This dataset contains code from various repositories with different licenses. Each sample includes its original license information in the `license` field.
|
49 |
+
|