bunyaminergen/Cornstack-Python-V1-Filtered
Cornstack Python v1 Filtered The Cornstack Python v1 Filtered dataset is derived from the nomic-ai/cornstack-python-v1 dataset by limiting queries to a maximum of 17 words and restricting the total number of rows to 423259. This dataset is suitable for Python programming education and question-answering applications. Note: If you would like to contribute to this repository, please read the CONTRIBUTING first. TableofContents Features File Structure Metadata Usage… See the full description on the dataset page: https://huggingface.co/datasets/bunyaminergen/Cornstack-Python-V1-Filtered.
<div align="center">
<h1>Cornstack Python v1 Filtered</h1>
The Cornstack Python v1 Filtered dataset is derived from the nomic-ai/cornstack-python-v1 dataset by limiting queries to a maximum of 17 words and restricting the total number of rows to 423259. This dataset is suitable for Python programming education and question-answering applications.
Note: If you would like to contribute to this repository, please read the [CONTRIBUTING](CONTRIBUTING.md) first.
</div>
TableofContents
Features
- Name: Cornstack Python v1 Filtered
- Primary Purpose: Contains query-document pairs with corresponding Python code implementations, focusing primarily on matrix and vector operations (e.g., matrix-vector multiplication, circulant and Toeplitz matrices), along with associated negative samples for machine learning tasks like code retrieval and similarity modeling.
- Language: English
- Format: JSONL
- License: GPL-3.0
File Structure
.
├── CONTRIBUTING.md
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── shard-00.jsonl.gz
├── shard-01.jsonl.gz
├── shard-02.jsonl.gz
├── shard-03.jsonl.gz
└── shard-04.jsonl.gz
1 directory, 10 filesMetadata
Data Dictionary
The dataset contains pairs of queries and documents with associated metadata, negative examples, and scoring information.
CSV
Example row (CSV):
JSON Lines
Each line represents one JSON object with the following structure:
{
"query": "string, textual query or instruction",
"document": "string, relevant code snippet or textual response",
"negatives": ["list of strings, non-relevant code snippets"],
"negative_scores": ["list of floats, scores for each negative example"],
"document_score": "float, score for the document",
"document_rank": "string, rank or category label",
"metadata": {
"objective": {
"self": "list, self-related metadata (often empty)",
"paired": "list, pairwise metadata (often empty)",
"triplet": [["query", "document", "negatives"]]
}
}
}Example row (JSONL):
{
"query":"Compute the matrixvector product y = Cu where C is a circulant matrix All matrices are real",
"document":"def circulant_multiplication(u, a): return real(ifft(fft(a)*fft(u)))",
"negatives":[
"def covar(fx,cx): ...",
"def __matmul__(self, q: np.ndarray): ..."
],
"negative_scores":[
0.7675772,
0.6984068
],
"document_score":0.69579995,
"document_rank":"2",
"metadata":{
"objective":{
"self":[ ],
"paired":[ ],
"triplet":[
[
"query",
"document",
"negatives"
]
]
}
}
}Usage
Hugging Face
from datasets import load_dataset
# 141k:
dataset_141k = load_dataset("bunyaminergen/cornstack-python-v1-filtered", revision="v3", split="train")
print(dataset_141k[0])
# 282k:
dataset_282k = load_dataset("bunyaminergen/cornstack-python-v1-filtered", revision="v5", split="train")
print(dataset_282k[0])
# 423k:
dataset_423k = load_dataset("bunyaminergen/cornstack-python-v1-filtered", revision="v7", split="train")
print(dataset_423k[0])Versioning
- v3: 141k version
- v5: 282k version
- v7: 423k version
Licence
- LICENSE
Team
Contact
Reference
This dataset is derived from the original dataset nomic-ai/cornstack-python-v1.
Citation
@misc{ CornstackPythonv1Filtered,
author = {Bunyamin Ergen},
title = {CornstackPythonv1Filtered},
year = {2025},
month = {03},
url = {https://huggingface.co/datasets/bunyaminergen/cornstack-python-v1-filtered},
}