File size: 1,564 Bytes
55dff4e
 
 
 
 
 
 
 
 
23a91b1
 
 
 
 
4ed4f59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
task_categories:
- summarization
language:
- en
tags:
- code
size_categories:
- 10K<n<100K
---

# Overview

This dataset contains 18,219 rows of code-docstring-ast data along with additional metadata. Data was gathered from various Python libraries and frameworks
publicly available GitHub repos. Initial raw dataset count was 25,480 down to 18,219 after preprocessing.

# Sources

The dataset was gathered from various GitHub repos sampled from [this repo by Vinta.](https://github.com/vinta/awesome-python)

The 26 repos are:
- matplotlib
- pytorch
- cryptography
- django
- prospector
- scikit-learn
- pandas
- numpy
- uvicorn
- feincms
- algorithms
- scrapy
- authlib
- seaborn
- coconut
- tensorflow
- flexx
- salmon
- mongo-python-driver
- virtualenv
- sphinx
- schema
- kornia
- scipy
- cherrypy
- pygame

Sampling was at random; I simply browsed through each category from Vinta's list and chose one from a random interesting category. 

# Dataset Instance

An instance of the dataset is as follows:

```
{
  <library> : <The library from which the source code came from>,
  <name> : <The name of the function/class/method>,
  <source code> : <The raw source code itself>,
  <docstring> : <The corresponding docstring of the code>,
  <type> : <Whether it's a function, method, or class>,
  <file_path> : <The relative path of the file containing the function>,
  <line_number> : <The line number of the function, method, or class within the file>,
  <ast_sequence> : <The ast sequence of the raw source code. Scroll down for more info about this>
}
```