Datasets:
language:
- code
license: other
size_categories:
- 100M<n<1B
task_categories:
- text-generation
pretty_name: KExercises
dataset_info:
features:
- name: path
dtype: string
- name: owner
dtype: string
- name: repo_id
dtype: int64
- name: is_fork
dtype: bool
- name: languages_distribution
dtype: string
- name: content
dtype: string
- name: issues
dtype: float64
- name: main_language
dtype: string
- name: forks
dtype: int64
- name: stars
dtype: int64
- name: commit_sha
dtype: string
- name: size
dtype: int64
- name: name
dtype: string
splits:
- name: train
num_bytes: 11610432277.542328
num_examples: 4049918
download_size: 4314441901
dataset_size: 11610432277.542328
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
Dataset Summary
KStack is the largest collection of permissively licensed Kotlin code.
Column description
The dataset contains the following columns:
size
— size of the file in bytescontent
— text (content) of the file after removing personal identifiable informationrepo_id
— GitHub ID of the repositorypath
— path to a fileowner
— repo owner on GitHubname
— repo name on GitHubcommit_sha
— hash of the commit, from which the revision of the file is takenstars
— number of stars in the repo at the moment of collectionforks
— number of forks in the repo at the moment of collectionissues
— number of issues in the repo at the moment of collectionis_fork
—true
if the repo is a fork or not as defined by GitHubmain_language
— main language of the repo as defined by GitHublanguages_distribution
— JSON with the distribution of languages by size in bytes in the repo
Comparison with the Stack v2
In the table below one can find the comparsion between the Kotlin part of the Stack v2 and KStack:
Files | Repositories | Lines | Tokens | |
---|---|---|---|---|
The Stack v2 | 2M | 109457 | 162M | 1.7B |
Kstack | 4M | 168902 | 292M | 3.1B |
Dataset Creation
Collection procedure
We collected repositories from GitHub with the main language being Kotlin, as well as any repositories with Kotlin files that have received 10 or more stars (as of February 2024). Additionally, we gathered repositories with Kotlin files from Stack v1.2. Kotlin files were identified using go-enry and include files with extensions such as .kt
, .kts
, and .gradle.kts
. It is estimated that we have collected 97% of available Kotlin repositories as of February 2024.
Initial filtering
We conducted full deduplication, using the hash of file content, as well as near deduplication using the same method as in Stack v1.2. We then aggregated the files from one near-deduplicated cluster into a single file from that cluster.
Detecting permissive licenses
We filtered permissive repositories based on the licenses detected by GitHub, and using go-license-detector if GitHub did not have licensing information available. The list of permissive licenses used in dataset can be found here.
Personal and Sensitive Information
We used the star-pii model to filter out personal information.
Opt-out
If you want your data to be removed from dataset, or have any other questions, please reach out to Sergey Titov: [email protected]