Datasets:
text stringlengths 12 1.05M | repo_name stringlengths 5 86 | path stringlengths 4 191 | language stringclasses 1
value | license stringclasses 15
values | size int32 12 1.05M | keyword listlengths 1 23 | text_hash stringlengths 64 64 |
|---|---|---|---|---|---|---|---|
########################################################################
# This program is copyright (c) Upinder S. Bhalla, NCBS, 2015.
# It is licenced under the GPL 2.1 or higher.
# There is no warranty of any kind. You are welcome to make copies under
# the provisions of the GPL.
# This programme illustrates buildi... | BhallaLab/moose | moose-examples/paper-2015/Fig2_elecModels/Fig2C.py | Python | gpl-3.0 | 14,223 | [
"MOOSE",
"NEURON"
] | 5eb6a5a439a675762a02c12cdff996e6a0d98f6ee874773cba2951727562aac5 |
# creates: N.LDA
import os
from gpaw.test import gen
gen('N')
os.system('cp N.LDA ../_build')
| qsnake/gpaw | doc/setups/N.py | Python | gpl-3.0 | 94 | [
"GPAW"
] | ad7d53917d97406476db3321deeeb0fb89711b3341fa301373e89d7cf3800a42 |
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | misko/neon | tests/test_model.py | Python | apache-2.0 | 5,468 | [
"Gaussian"
] | 3bfd6fb19f3b714563f6e85de7e32ae6cf3194700cb2bc8edfd82d289f9d24bc |
#!/usr/bin/env python
"""Extract read start from BAM files to Wig format for PAUSE.
Usage:
bam_to_wiggle.py <BAM file>
"""
import os
import tempfile
from contextlib import contextmanager
import pysam
import subprocess
import argparse
@contextmanager
def indexed_bam(bam_file):
if not os.path.exists(bam_file.... | TAMU-CPT/galaxy-tools | tools/pause/pause_starts_to_wiggle.py | Python | gpl-3.0 | 4,610 | [
"Galaxy",
"pysam"
] | 7a17a731153d43766a00672d66cbc22da6041df4aad39283a34c65b81a35440d |
#!/usr/bin/env python
""" check_pseudo.py calculates energy for 7 alat points near SIESTA equilibrium to fine tune the delta-factor.
"""
import os
import sys
import uuid
import glob
import numpy as np
import shutil
import matplotlib.pyplot as plt
from generate import PGInputFile, PTInputFile
from get_energies import... | ansobolev/PseudoGenerator | pseudogen/check_pseudo.py | Python | mit | 2,386 | [
"SIESTA",
"WIEN2k"
] | 2286a65136ae498e930e31d1f7c6bfcf92c0cc82d6b4540635ee0de03e12cad9 |
from copy import deepcopy as dc
from itertools import combinations
import ase.io as aseio
import numpy as np
from ase.atoms import Atoms as AAtoms
from pyiid.asa import calculate_asa, get_neighbor_list, get_coordination
__author__ = 'christopher'
def convert_stru_to_atoms(stru):
symbols = []
xyz = []
t... | CJ-Wright/pyIID | pyiid/utils.py | Python | bsd-3-clause | 5,803 | [
"ASE"
] | 5e32988f1ea4991d436343938a03c8967054e4336fc3660a3273e5bdda9ddf19 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A app configuration defines the user-tunable parameters of the application and also the quality evaluation such as the:
* Amazon Mechanical Turk HIT description, pricing, keywords, etc.
* The description and instructions of the task
* The configuration of the type of t... | mcartwright/CAQE | src/caqe/configuration.py | Python | mit | 19,785 | [
"VisIt"
] | 60f1965a4f5b55df7d2bb1ddb9a6d553291e0b68e9e279e55f56f6f2698d3754 |
#!/usr/bin/env python
#
# Wrapper script for Java Conda packages that ensures that the java runtime is invoked with the right options.
# Adapted from https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-shaker/1.16.16/peptide-shaker.py (accessed June, 21th 2019).
#
# Program Parameters
#
import os
... | cokelaer/bioconda-recipes | recipes/gemoma/GeMoMa.py | Python | mit | 3,169 | [
"Bioconda"
] | 018ca2619f82a0002e2334d695e8fe532aec2293d4d5bda0711ecab68d30118d |
# sql/elements.py
# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Core SQL expression elements, including :class:`.ClauseElement`,
:class:`.ColumnEle... | alex/sqlalchemy | lib/sqlalchemy/sql/elements.py | Python | mit | 80,420 | [
"VisIt"
] | 86bfc65f9d734ee04a7c2773fb927f89f54190ec9301257a444d40b24eadaa09 |
from .base import *
class session(object):
"""
cytoscape session interface as shown in CyREST's swagger documentation for 'session'.
:param url: an url of the type 'http://' + host + ':' + str(port) + '/' + version + '/'.
"""
def __init__(self, url):
self.__url = url + 'commands/session'
... | idekerlab/py2cytoscape | py2cytoscape/cyrest/session.py | Python | mit | 4,191 | [
"Cytoscape"
] | fe26253e7102c00f30e59407705c422f04c4aea74d370ec2e61a6ff1b43b3e24 |
#!/usr/bin/env python3
from abc import ABC, abstractproperty
import torch
from .. import settings
from ..distributions import Delta, MultivariateNormal
from ..module import Module
from ..utils.broadcasting import _mul_broadcast_shape
from ..utils.memoize import cached, clear_cache_hook
class _VariationalStrategy(M... | jrg365/gpytorch | gpytorch/variational/_variational_strategy.py | Python | mit | 6,122 | [
"Gaussian"
] | cbf329ff3ac64378b8e2456fbfd4a4611c6f179ada0ab8216307b67e4a26bc48 |
from __future__ import division, unicode_literals
import warnings
import matplotlib
matplotlib.use('pdf')
import unittest as unittest
import numpy as np
from pymatgen import Composition
from pymatgen.entries.computed_entries import ComputedEntry
from pymatgen.analysis.phase_diagram import PhaseDiagram, \
GrandP... | nisse3000/pymatgen | pymatgen/analysis/tests/test_interface_reactions.py | Python | mit | 17,218 | [
"pymatgen"
] | 5ab5543c3163c6a13a930820d2e2aad8e90291dea8fb5580e6fc7d826acf1d31 |
from __future__ import unicode_literals
import datetime
import requests
from requests_oauthlib import OAuth1
from oauthlib.oauth1 import (SIGNATURE_RSA, SIGNATURE_TYPE_AUTH_HEADER,
SIGNATURE_HMAC)
from six.moves.urllib.parse import urlencode, parse_qs
from .constants import (XERO_BASE_URL,... | MJMortimer/pyxero | xero/auth.py | Python | bsd-3-clause | 13,625 | [
"VisIt"
] | e7c50eaf91b091a9ca538d2b45240df1a54ccca446f71eff0b782f19c8a6baa2 |
import ast
import collections
from ..visitor import ClassVisitor, handle
from . import Metric
class _TypeCountVisitor(ClassVisitor):
@handle(ast.AST)
def __visit_ast(self, node):
return (node.__class__,) + tuple(cls for name in node._fields for cls in self.visit(getattr(node, name)))
@handle(co... | herczy/pydepend | pydepend/metric/cyclomatic.py | Python | bsd-3-clause | 1,908 | [
"VisIt"
] | c66a25e202655c7f073a823fb8d8dccc257ea7f48e319421947bec27c7206669 |
from django.conf import settings
from django.contrib.sites.models import get_current_site
from django.core.urlresolvers import reverse
from django.http import Http404, HttpResponse
from django.shortcuts import redirect
from .models import APIKey, Short, Visit
def _record_visit(request, short):
remote_addr = (
... | sneeu/little | little/views.py | Python | mit | 1,560 | [
"VisIt"
] | 5044b35c3eb85a66e78dc6ba0307c40f432a7e54e2055aee67a8bee015916f5c |
ChemPile-Code
A comprehensive collection of filtered scientific code from chemistry, biology, and materials science
π Dataset Summary
ChemPile-Code includes filtered code from popular datasets such as the Stack and GitHub-code. It is designed to provide a rich source of scientific coding from fields such as chemistry, biology, and materials science. The dataset is part of the ChemPile project, and aims to create a comprehensive collection of chemistry code for training language models. The filtering process is keyword-based, focusing on packages and libraries relevant to chemistry, biology, and materials science. Those keywords include simulation packages such as LAMMPS, GROMACS, and OpenMM, as well as libraries like RDKit, ASE, and MDTraj, or plotting programmes like VMD or PyMOL. To avoid duplicates, exact hash matching was used to filter out identical code snippets.
π Dataset Statistics
| Subset | Tokens | Documents | Description |
|---|---|---|---|
| CodeParrot GitHub-Code Chemistry Python | 1.8B | 208K | Python code from GitHub repositories |
| StarCoder Chemistry | 16.1B | 2.06M | Python code from the Stack dataset |
| Total | ~17.9B | ~2.27M | Scientific code snippets |
ποΈ Dataset Configurations
The dataset includes different subsets available as Hugging Face configurations:
codeparrot_github-code-chemistry-python-defaultstarcoder-chemistry-default
π License
All content is released under the AGPL-3.0 license, which allows for:
- β Free use and distribution
- β Commercial use
- β Modification and derivatives
- β οΈ Attribution required
However, the dataset combines code under different licenses. The config codeparrot_github-code-chemistry-python-default is designed such that is possible to filter the dataset based on the license. Therefore, this config has code under the next licenses:
- MIT
- GPL-3.0
- BSD-3-Clause
- GPL-2.0
- Apache-2.0
- LGPL-2.1
- AGPL-2.0
- AGPL-3.0
- LGPL-3.0
- MPL-2.0
- BSD-2-Clause
π Dataset Details
π CodeParrot
Source: CodeParrot is a subset of GitHub code, that we specifically filtered for chemistry-related content
Coverage: Python code from the GitHub Code dataset
Extraction Method: Keyword-based filtering focusing on chemistry, biology, and materials science packages and libraries
Fields:
text: The code snippetrepo_name: The name of the repository where the code snippet was foundpath: The path to the file within the repositorylanguage: The programming language of the code snippetlicense: The license of the repositorysize: The size of the code snippet in byteskeyword: A list of keywords that were used to filter the code snippettext_hash: A hash of the code snippet to avoid duplicates
Statistics: 208K code snippets with a total of over 1.8B tokens
βοΈ StarCoder
Source: StarCoder is a subset of the Stack dataset, that we specifically filtered for chemistry-related content
Coverage: Python code from the Stack dataset
Extraction Method: Keyword-based filtering with exact hash matching to avoid duplicates
Fields:
text: The code snippetrepo_name: The name of the repository where the code snippet was foundkeyword: A list of keywords that were used to filter the code snippettext_hash: A hash of the code snippet to avoid duplicates
Statistics: 2.06M code snippets with a total of over 16.1B tokens
π Quick Start
from datasets import load_dataset, get_dataset_config_names
# Print available configs for the dataset
configs = get_dataset_config_names("jablonkagroup/chempile-code")
print(f"Available configs: {configs}")
# Available configs: ['codeparrot_github-code-chemistry-python-default', 'starcoder-chemistry-default']
dataset = load_dataset("jablonkagroup/chempile-code", name=configs[0])
# Loading config: codeparrot_github-code-chemistry-python-default
print(dataset)
# DatasetDict({
# train: Dataset({
# features: ['text', 'repo_name', 'path', 'language', 'license', 'size', 'keyword', 'text_hash'],
# num_rows: 186878
# })
# test: Dataset({
# features: ['text', 'repo_name', 'path', 'language', 'license', 'size', 'keyword', 'text_hash'],
# num_rows: 10383
# })
# val: Dataset({
# features: ['text', 'repo_name', 'path', 'language', 'license', 'size', 'keyword', 'text_hash'],
# num_rows: 10382
# })
# })
split_name = list(dataset.keys())[0]
sample = dataset[split_name][0]
print(sample)
# {
# 'text': 'import moogli
except Exception as e:...
# 'repo_name': 'BhallaLab/moose',
# 'path': 'moose-examples/paper-2015/Fig2_elecModels/Fig2C.py',
# 'language': 'Python',
# 'license': 'gpl-3.0',
# 'size': 14223,
# 'keyword': ['MOOSE', 'NEURON'],
# 'text_hash': '5eb6a5a439a675762a02c12cdff996e6a0d98f6ee874773cba2951727562aac5'
# }
π― Use Cases
- π€ Code Generation: Training models for scientific code generation and completion
- π¬ Scientific Computing: Building systems for computational chemistry and materials science
- π Code Search: Advanced scientific code repository search and analysis
- π Documentation: Automated code documentation and analysis for scientific software
- π§ Domain Adaptation: Adapting models to scientific computing paradigms and libraries
β οΈ Limitations & Considerations
- Language: Primarily Python code (monolingual dataset)
- Scope: Focused on scientific computing; may include domain-specific jargon and advanced concepts
- Quality: Variable quality across sources; some code may be incomplete or contain errors
- Bias: Reflects biases present in open-source scientific software development
- License: Mixed licenses from source repositories - check individual
licensefield - Duplicates: Hash-based deduplication applied but some semantic duplicates may remain
π οΈ Data Processing Pipeline
- Collection: Automated extraction from GitHub-code and Stack datasets
- Filtering: Keyword-based filtering for chemistry, biology, and materials science relevance
- Deduplication: Exact hash matching to remove identical code snippets
- Quality Control: Automated filtering and validation
- Standardization: Consistent formatting and metadata extraction
- Validation: Train/validation/test splits and quality checks
ποΈ ChemPile Collection
This dataset is part of the ChemPile collection, a comprehensive open dataset containing over 75 billion tokens of curated chemical data for training and evaluating general-purpose models in the chemical sciences.
Collection Overview
- π Scale: 75+ billion tokens across multiple modalities
- 𧬠Modalities: Structured representations (SMILES, SELFIES, IUPAC, InChI), scientific text, executable code, and molecular images
- π― Design: Integrates foundational educational knowledge with specialized scientific literature
- π¬ Curation: Extensive expert curation and validation
- π Benchmarking: Standardized train/validation/test splits for robust evaluation
- π Availability: Openly released via Hugging Face
π Citation
If you use this dataset in your research, please cite:
@article{mirza2025chempile0,
title = {ChemPile: A 250GB Diverse and Curated Dataset for Chemical Foundation Models},
author = {Adrian Mirza and Nawaf Alampara and MartiΓ±o RΓos-GarcΓa and others},
year = {2025},
journal = {arXiv preprint arXiv:2505.12534}
}
π₯ Contact & Support
- Paper: arXiv:2505.12534
- Website: ChemPile Project
- Dataset: Hugging Face
- Issues: Please report data issues or questions via the Hugging Face dataset page
- Downloads last month
- 261

