Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
10M - 100M
License:
metadata
pretty_name: python-source-code
languages:
- en
source_datasets:
- original
task_categories:
- text-generation
task_ids:
- language-modeling
Python source code
Dataset Summary
Python source code dataset is a collection of 260 Github Python repos, it contains 5.22 million lines code, the zip size 41MB. This dataset can be used in different NLP tasks like language modeling and text generation tasks.
Description
This dataset contains 5.22M python codes. text file only has code. Here is a sample of dataset:
import math
def res(x, y):
if 0 not in (x, y):
# We use the relation x^y = y*log10(x), where 10 is the base.
return y * math.log10(x)
else:
if x == 0: # 0 raised to any number is 0
return 0
elif y == 0:
return 1 # any number raised to 0 is 1
Citation
@misc{code-autocomplete,
author = {Xu Ming},
title = {code-autocomplete: Code AutoComplete with GPT2 model},
year = {2022},
publisher = {GitHub},
journal = {GitHub repository},
url = {https://github.com/shibing624/code-autocomplete},
}
Contributions
Thanks to shibing624 for adding this dataset.