File size: 2,050 Bytes
f3cc518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8ab13af
 
 
 
 
 
 
f3cc518
076f817
8ab13af
076f817
 
 
8ab13af
076f817
 
 
8ab13af
076f817
 
8ab13af
076f817
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8ab13af
076f817
 
 
8ab13af
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
dataset_info:
  features:
  - name: code
    dtype: string
  - name: docstring
    dtype: string
  - name: func_name
    dtype: string
  - name: language
    dtype: string
  - name: repo
    dtype: string
  - name: path
    dtype: string
  - name: url
    dtype: string
  - name: license
    dtype: string
  splits:
  - name: train
    num_bytes: 1319884423
    num_examples: 858128
  - name: validation
    num_bytes: 20659872
    num_examples: 13376
  - name: test
    num_bytes: 25958039
    num_examples: 18051
  download_size: 387807991
  dataset_size: 1366502334
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
license: apache-2.0
task_categories:
- translation
language:
- en
tags:
- code
---

# Python Code Dataset

## Dataset Description

This dataset contains Python functions with their documentation comments extracted from GitHub repositories.

### Features

- `code`: The Python function code
- `docstring`: Documentation comment for the function
- `func_name`: Function name
- `language`: Programming language (always "Python")
- `repo`: Source repository name
- `path`: File path within the repository
- `url`: GitHub URL to the source file
- `license`: License of the source code

## Dataset Structure

The dataset contains the following splits:
        
- train: 858128 examples
- validation: 13376 examples
- test: 18051 examples

## Usage

```python
from datasets import load_dataset

# Load the dataset
dataset = load_dataset("USERNAME/DATASET_NAME")

# Access the training split
train_data = dataset["train"]

# Example: Print the first sample
print(train_data[0])
```

## Source

This dataset was created by scraping Python code from GitHub repositories. Each function includes its documentation comment and license information.

## License

This dataset contains code from various repositories with different licenses. Each sample includes its original license information in the `license` field.