Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
10M - 100M
License:
Commit ·
4732cbe
1
Parent(s): 6e84a83
Update README.md
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849---pretty_name: python-source-codelanguages:- ensource_datasets:- originaltask_categories:- text-generationtask_ids:- language-modeling---# Python source code# Dataset SummaryPython 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.# DescriptionThis dataset contains 5.22M python codes. text file only has code. Here is a sample of dataset:```pythonimport mathdef 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 0return 0elif y == 0:return 1 # any number raised to 0 is 1```### Citation```latex@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},}```### ContributionsThanks to [shibing624](https://github.com/shibing624) for adding this dataset.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175---annotations_creators:- no-annotationlanguage_creators:- crowdsourcedlanguages:- enlicenses:- cc-by-4-0- gfdl-1-3-or-latermultilinguality:- monolingualsize_categories:- 100M<n<200Msource_datasets:- https://github.com/shibing624/code-autocomplete- https://github.com/bharathgs/Awesome-pytorch-list- https://github.com/akullpp/awesome-java- https://github.com/fffaraz/awesome-cpptask_categories:- sequence-modelingtask_ids:- language-modeling---# Dataset Card for "SourceCode"## Table of Contents- [Dataset Description](#dataset-description)- [Dataset Summary](#dataset-summary)- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)- [Languages](#languages)- [Dataset Structure](#dataset-structure)- [Data Instances](#data-instances)- [Data Fields](#data-fields)- [Data Splits](#data-splits)- [Dataset Creation](#dataset-creation)- [Curation Rationale](#curation-rationale)- [Source Data](#source-data)- [Annotations](#annotations)- [Personal and Sensitive Information](#personal-and-sensitive-information)- [Considerations for Using the Data](#considerations-for-using-the-data)- [Social Impact of Dataset](#social-impact-of-dataset)- [Discussion of Biases](#discussion-of-biases)- [Other Known Limitations](#other-known-limitations)- [Additional Information](#additional-information)- [Dataset Curators](#dataset-curators)- [Licensing Information](#licensing-information)- [Citation Information](#citation-information)- [Contributions](#contributions)## Dataset Description- **Repository:** [code-autocomplete](https://github.com/shibing624/code-autocomplete)- **Leaderboard:** [leaderboard](https://github.com/shibing624/code-autocomplete) (located on the homepage)- **Size of downloaded dataset files:** 105 MB- **Total amount of disk used:** 570 MB### Dataset SummarySource code dataset is a collection of Github awesome repos, it contains Python, Java, C++, and other programming languages.This dataset can be used in different NLP tasks like language modeling and text generation tasks.```pythonPYTHON_CODE_HOME = "https://github.com/bharathgs/Awesome-pytorch-list"JAVA_CODE_HOME = "https://github.com/akullpp/awesome-java"CPP_CODE_HOME = "https://github.com/fffaraz/awesome-cpp"```### Supported Tasks and Leaderboards- language modeling- code generation tasks:**Leaderboard:** [code-autocomplete](https://github.com/shibing624/code-autocomplete)### Languages- programming languages: Python, Java, C++- natural language: English## Dataset Structure### Data InstancesAn example of 'train' looks as follows.```This example was too long and was cropped:{"text": """import jsonimport argparsedef _parse_args():parser = argparse.ArgumentParser(description=__doc__,formatter_class=argparse.RawTextHelpFormatter,)parser.add_argument('--model-file',required=True,help=('A pt file from ''https://github.com/pytorch/fairseq/tree/main/examples/hubert'))return parser.parse_args()"""}```### Data FieldsThe data fields are the same among all splits.- `text`: a `string` feature.### Data Splits#### python```shell$ wc -l python/*10000 python/test.txt5215412 python/train.txt10000 python/valid.txt5235412 total```#### java```shell$ wc -l java/*950083 java/test.txt2802880 java/train.txt940803 java/valid.txt4693766 total```#### cpp```shell$ wc -l cpp/*1060014 cpp/test.txt3119241 cpp/train.txt1099124 cpp/valid.txt5278379 total```## Dataset Creation### Curation RationaleAs code generation dataset, I upload it to huggingface datasets.### Source Data#### Initial Data Collection and Normalization#### Who are the source language producers?Citation:APA:```latexXu, M. code-autocomplete: Code AutoComplete with GPT2 model (Version 0.0.4) [Computer software]. https://github.com/shibing624/code-autocomplete```BibTeX:```latex@software{Xu_code-autocomplete_Code_AutoComplete,author = {Xu, Ming},title = {code-autocomplete: Code AutoComplete with GPT2 model},url = {https://github.com/shibing624/code-autocomplete},version = {0.0.4}}```### Annotations#### Annotation process#### Who are the annotators?nobody### Personal and Sensitive Information## Considerations for Using the Data### Social Impact of DatasetThis dataset was developed as a benchmark for evaluating code generation model.### Discussion of Biases### Other Known Limitations## Additional Information### Dataset CuratorsGithub awesome programing code repos.### Licensing InformationFor research use only.### ContributionsThanks to [@shibing624](https://github.com/shibing624) add this dataset.
README.md+155-29