Shuu12121's picture
Update README.md
8ab13af verified
metadata
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

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.