sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
6253fd3589121d8417376f870abbc8f350d20d9489200f79a309df1f5c73b734 | Python | 189 | 6 | from __future__ import absolute_import
from . import app
x = app.MainWindow()
#x.objectsPane.open('/home/arthur/forcebalance/studies/001_water_tutorial/1.netforce_torque.in')
x.mainloop()
|
14edf228084bd679af35a28d66dca474492046f34d536f410bc644d9a38f8b43 | Python | 190 | 5 | import gl
gl.resetdefaults()
gl.meshload('/Users/chris/afni/pial/lh.sphere')
gl.overlayload('/Users/chris/afni/pial/lh.HCP-MMP1.annot')
gl.atlas2node('/Users/chris/afni/pial/mynodes.node');
|
22ed8ce7de2792a6bf1097a7b47969ec008d5f21b327745697e14743c6ea81f6 | Python | 190 | 7 | import numpy as np
#ratios = [0, 15.0, 9.0, 3.0, 2.0, 1.5]
default_ratio = 0 #ratios[0]
intro_ratios = [9.0] #[ratios[2]]
final_ratios = [4.0] #[ratios[3]]
hard_ratios = [2.5] #[ratios[4]]
|
c3286967de70c13f0127ab9ff5b7e8573f972dd438c7d9dde221709250e5213f | Python | 190 | 4 | L,R = 0,1
COR,INCOR,EARLY_L,EARLY_R,NULL,KILLED = 1,0,2,3,4,5
EARLY = [EARLY_L, EARLY_R]
PHASE_INTRO, PHASE_STIM, PHASE_DELAY, PHASE_LICK, PHASE_REWARD, PHASE_ITI, PHASE_END = 0,1,2,3,4,5,6
|
1a47516eca92f388c70eb427a7c079b16cd54bc7383779eb15a3eadb0a9de307 | Python | 191 | 6 | import pandas as pd
df = pd.read_csv(snakemake.input.subclonality, sep="\t")
df.loc[df["Subclonality"] == snakemake.wildcards.clone].to_csv(
snakemake.output[0], sep="\t", index=False
)
|
6388dc199642df7f0b4473816d5b9dc90a0911007336d865fd9bc7fe6bccdff9 | Python | 191 | 11 | """
Atom and bond features for GNN models.
For an introduction to the theory behind this module,
see :ref:`featurization_theory`
"""
from ._base import Feature
__all__ = [
"Feature",
]
|
fc3b0b8f3409e55cfafeb1590aaaf9e293aa9569faf0861a0ed6a46fd9d0c31a | Python | 191 | 7 | """
Structures for managing molecule graphs
"""
from ._dgl.molecule import DGLMolecule
from ._dgl.batch import DGLMoleculeBatch
from ._graph.molecule import GraphMolecule, GraphMoleculeBatch |
e013fcadd7beb8651ffbb0744f275a35b1148d6ed7a15eb564e5692c07b67df8 | Python | 192 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("scipy")
datas = collect_data_files("scipy")
|
432a455a2cc37aa0943fe9aa4c736656f935fb760ffa87f3bd2b146610822f4b | Python | 193 | 6 | """
Copright © 2023 Howard Hughes Medical Institute, Authored by Carsen Stringer and Atika Syeda.
"""
" Test Facemap neural prediction output "
# TODO: Add tests for neural prediction output
|
20bcf9ece622262e6b040600b0950e772b404682b5ee2c43a0ab07830cacbd6f | Python | 194 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("gevent")
datas = collect_data_files("gevent")
|
3b90b8d58f25d805f3652a65794c6d2cc598e9c80bd8f80c62bbc7576f0bc9e7 | Python | 195 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("antspyx")
datas = collect_data_files("antspyx") |
755a83d624ed9600fea9629d382babae2867cee40118ebc5c8e51fd367832b6b | Python | 195 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("nibabel")
datas = collect_data_files("nibabel") |
cc14e1ff8a9b3f84af3965de313b05b44597d1728d8c02f3c3db0aa510cd89a7 | Python | 195 | 6 | from gufe import LigandAtomMapping
from kartograf import KartografAtomMapper
from . import lomap_scorers
from .ligandatommapper import LigandAtomMapper
from .lomap_mapper import LomapAtomMapper
|
d1a6496e3f58fec7fd4135bd494b078e5c91fe5115054cbd01c17ef6dd257ece | Python | 195 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("sklearn")
datas = collect_data_files("sklearn") |
d66e066764053dabcf3c284ddb2099eb835d5f06481cf9a396de4f99504fa261 | Python | 195 | 5 | from utils.schema_test_tools import test_local
test_local(path_to_schema_dir='config/dumps/',
schema_file='neo4j2owl_config_schema.json',
path_to_test_dir='config/dumps/')
|
08e638383056d088eff8ad712b61060dec3b95db9ae5a514105091c31bd4227a | Python | 196 | 6 | from .cost_TS import CostsTS
from .cost_FC import CostsFC
from .cost_FC import CostsFixedFC
from .cost_Mean import CostsMean
from .cost_PSD import CostsPSD
from .cost_PSD import CostsFixedPSD |
48104a33cbe5c8b057360a23cec45ac1810c46185d0e481954fcac3e1862128e | Python | 196 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("rtutils")
datas = collect_data_files("rtutils")
|
79864a7e4274a53184cb1a56ff04ea0c9d23c1815ef22fcdee53565dac3973cb | Python | 196 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("pydicom")
datas = collect_data_files("pydicom")
|
9064d1032e64fb166f500f2fcacecf96a552a9c51cc3e3e1628c5c89c498c567 | Python | 197 | 8 | """
Authors: Zheng Wang, John Griffiths, Andrew Clappison, Hussain Ather
Neural Mass Model fitting
module for functions used in the model
"""
import torch
from torch.nn.parameter import Parameter
|
32a236f6cf85430c51bae1094d17cf5957726a89198336e57969741b6613c97a | Python | 198 | 7 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
METADATA_UNPROCESSED = "unprocessed"
METADATA_PROCESSED = "processed"
|
8f95761cf2f8e8b76e43567458ad4811b51dfeee1a18b629c585124674e617e6 | Python | 199 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("distutils")
datas = collect_data_files("distutils") |
bac3eb55aae9f321aa619781ad8cd7e7f6aa12b434bb57f5e20f744500ec9f45 | Python | 199 | 7 | import numpy as np
from .mle_modification import MLEModification
class MLEFunctional:
def __init__(self, x, cdf=None, xmin=None, xmax=None):
self.modification = MLEModification(cdf, xmin, xmax)
|
c2af7afc722d7e8ed1f267c88d7f3ee5137f93538a4f542a6f1efc137d68db28 | Python | 199 | 8 | import pandas as pd
gene_info=pd.read_csv('/data1/bigbrain/phate_testing/gene_info.csv')
ex = gene_info[['gene.symbol']]
ex.to_csv('/data1/bigbrain/phate_testing/all_gene_lists.csv',index=False)
|
8ed0861cfeea913f21d77e6a10b5d6a2cff81cca7a39cbfb6d609fd0624fc5a9 | Python | 200 | 3 | from framework.core.config import ExperimentConfig # noqa: F401
from framework.core.data import Batch, GraphData, ModelOutput # noqa: F401
from framework.core.registry import REGISTRY # noqa: F401
|
73cfb1c019da419282b4df554b8f7c72b7965b607b8be58210c200a1bd635aeb | Python | 202 | 8 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152.rh.mz3')
gl.overlayload('motor_4t95mesh.mz3')
gl.overlaycolorname(1, 'red')
gl.shaderxray(1.0, 0.3)
gl.azimuthelevation(110, 15)
gl.meshcurv() |
9cd59891e5071e83ec95e7b6f8d31ca36b30c548ab0a8e0f995c528ee49567e0 | Python | 203 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("statsmodels")
datas = collect_data_files("statsmodels") |
2c91281a0357b8f8fda9f05880c870dbdd7ecf44c17f31c1bd9f5ea41458eeeb | Python | 204 | 8 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152Right.mz3')
gl.overlayload('motor_4t95mesh.mz3')
gl.overlaycolorname(1, 'red')
gl.shaderxray(1.0, 0.3)
gl.azimuthelevation(110, 15)
gl.meshcurv() |
22e188f60a0d900de6877add48db5dcc32d828e11fa53fe1f9ea5cb468dc7dcc | Python | 205 | 6 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files
hiddenimports = collect_submodules("scikit-learn")
datas = collect_data_files("scikit-learn") |
f256f79f090b10805ae797e8e8fc8a4d579ccc3d67c4218534190176302644ec | Python | 205 | 15 | from abc import ABC, abstractmethod
class distribution_continuous(ABC):
@abstractmethod
def cdf(self, x):
pass
@abstractmethod
def pdf(self, y):
pass
@abstractstaticmethod
def fit(s):
pass
|
beaddfc5f4c45cc36eec254001c2442205ce93b28ed9c171b3d5cbf49f81f643 | Python | 207 | 12 | """
Import tests
"""
import cinnabar
import pytest
import sys
def test_cinnabar_imported():
"""Sample test, will always pass so long as import statement worked"""
assert "cinnabar" in sys.modules
|
283683161885debb33fa23a21b24dd6ffe02373317ce651831607a49b5a848c4 | Python | 209 | 14 | """
Import tests
"""
import sys
import pytest
import cinnabar
def test_cinnabar_imported():
"""Sample test, will always pass so long as import statement worked"""
assert "cinnabar" in sys.modules
|
d1ccda78d3f0ae3c3c2552e23a3f6fc755baf862443f52fff9bb0403c7037f9a | Python | 210 | 9 | """YAMMBS: Yet Another Molecular Mechanics Benchmarking Suite."""
from importlib.metadata import version
from yammbs._store import MoleculeStore
__all__ = ("MoleculeStore",)
__version__ = version("yammbs")
|
eeaa4b7c205cbebb314617b4f50c7be3b5dc5c29ac978096e99be522ebcd54e9 | Python | 212 | 9 | from .element_change import (
filter_atoms_h_only_h_mapped,
filter_element_changes,
)
from .ring_changes import (
filter_ringsize_changes,
filter_ringbreak_changes,
filter_whole_rings_only,
)
|
bc8880e4e870e361c46b019d7d543923e3b94310503fe792141e79640c6e41c6 | Python | 213 | 10 | import gl
import sys
print(sys.version)
print(sys.path)
print(gl.__doc__)
for key in dir( gl ):
if not key.startswith('_'):
x = getattr( gl, key ).__doc__
print(key+' (built-in function): ')
print(x) |
2fe26f87eb515641e2208aed1423f2d78f1f8ac0c7bd3861da714c2ac92624e1 | Python | 218 | 12 | from setuptools import setup, find_packages
setup(
name='multimodal_decoding',
version='0.1',
packages=find_packages(),
url='',
license='',
author='',
author_email='',
description=''
)
|
f87f188b443b5e1f6565cb4f24ccb1b7863fbdb75f622d7cd8e8afd5dfbd6fab | Python | 218 | 8 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152Left_smoothed.mz3')
gl.meshcurv()
gl.shadername('hidecurves')
gl.overlayload('CIT168.mz3')
gl.shaderforbackgroundonly(1)
gl.shaderadjust('curvthreshhi', 0.44)
|
e98726730270948b03f1b0d34407ece1bd698eec521d3c62286ffcc4535d335b | Python | 219 | 12 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 7 11:17:06 2025
@author: saiful
"""
import pandas as pd
df = pd.read_csv("/data/saiful/ePPI/alphafold_eppi_embeddings/eppi_enzym_info_all.csv")
|
083c33c0d193eeb2d5fecf20dfdf09c5873f0556a69ccda2b1df6f0c6024bfa5 | Python | 221 | 11 | import base64
from pyroaring import BitMap
def serialize_bitmap(bitmap: BitMap) -> str:
return base64.b64encode(bitmap.serialize()).decode("ascii")
def bitmap_count(bitmap: BitMap) -> int:
return len(bitmap)
|
b1eac01142f3170332e99df762fc20f81c839181ab15e6dac94f8929d89028b1 | Python | 221 | 10 | import numpy as np
import os, os.path
import logging
def test_openmm_platforms():
"""Testing comparison of platforms."""
from openmmtools.scripts import test_openmm_platforms
# test_openmm_platforms.main()
|
36b1a85d20d10b90fa2c0e66ec334bdc67855f609da6acc1faa275967c19a298 | Python | 222 | 10 | from sybil import Sybil
from sybil.parsers.rest import PythonCodeBlockParser
pytest_collect_file = Sybil(
name="tests",
parsers=[
PythonCodeBlockParser(),
],
patterns=["*.py", "*.rst"],
).pytest()
|
354eaa70933b796e641d1ca497640b368a43e951ff5fd8b86ebb69e5ce00af93 | Python | 223 | 9 | from PyInstaller.utils.hooks import collect_submodules
hiddenimports = [
"PySide6.QtCore",
"PySide6.QtGui",
"PySide6.QtWidgets",
"PySide6.QtWebEngineWidgets",
# only include the ones you actually use
]
|
5e7077d42fa1c036509066b5dd995ec93c745a230df04a513a46ec6c77145e83 | Python | 228 | 8 | from util import now,now2
def add_to_saver_buffer(buf, source, data, ts=None, ts2=None, columns=None):
if ts is None:
ts = now()
if ts2 is None:
ts2 = now2()
buf.put([source, data, ts, ts2, columns]) |
c924f92483d71b41dbdcdaf8539d6d880cfb8b7bb25a187fbc5b8e857f2999e4 | Python | 230 | 8 | from numpy.testing import assert_allclose
from openff.nagl.features._utils import one_hot_encode
def test_one_hot_encode():
encoding = one_hot_encode("b", ["a", "b", "c"]).numpy()
assert_allclose(encoding, [[0, 1, 0]])
|
83eecf878e67cc82deffbc6fc5d6d379bac766ae26416c48387d6b8cc73ac6bb | Python | 232 | 12 | from .core import *
from .codec import *
def ToASCII(label):
return encode(label)
def ToUnicode(label):
return decode(label)
def nameprep(s):
raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol')
|
ebe9f80c72f69b9b6b06b94d5fbf91fe5c67d3671c2fd1c4bd06a364bca009e8 | Python | 232 | 10 | import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
SRC_ROOT = PROJECT_ROOT / "src"
for path in (PROJECT_ROOT, SRC_ROOT):
if str(path) not in sys.path:
sys.path.insert(0, str(path))
|
959e83b2260ed32e63c910452055fff619bd051957291747f8710b107caa45b4 | Python | 233 | 8 | """
Model architectures and factory
"""
from .model import CustomModelCheckpoint, ModelBuilder, ModelLoader
from .model_factory import ModelFactory
__all__ = ["ModelFactory", "ModelBuilder", "ModelLoader", "CustomModelCheckpoint"]
|
26ea24f20dcd9a9f9bcb1ce6ecdf9ed95000b05f46b3f80e3ee95fbb9c9be53b | Python | 235 | 11 | import os
import random
import numpy as np
import tensorflow as tf
def set_global_seed(seed: int = 42) -> None:
os.environ["PYTHONHASHSEED"] = str(seed)
random.seed(seed)
np.random.seed(seed)
tf.random.set_seed(seed)
|
99703fa563c79d54987312a4e9678812e7f77183c3e50c52bb6d27b84da6d4bd | Python | 237 | 9 | # pylint:disable='import-error'
from nemsi import Morphology
from bsb.morphologies import Morphology as _Morpho
def convert_swc(data):
m = Morphology.from_swc_data(data)
data = m.to_swc()
return _Morpho.from_swc_data(data)
|
2f7decda98da83d47f1e80dafa6506d6810e65c2bea5ec619d01d7e31959bba2 | Python | 238 | 9 | import unittest
from shapely.geometry import Point
from shapely.validation import explain_validity
class ValidationTestCase(unittest.TestCase):
def test_valid(self):
assert explain_validity(Point(0, 0)) == "Valid Geometry"
|
e6ae87101d3cb3b3d423feb998f18f6422a1110a6c78370df4d9f691d181a1e8 | Python | 238 | 6 | stim_phase_durs = [ [[1.],None], [[2.,2.8,3.8],[.4,.3,.3]] ]
default_stim_phase_duration = [[3.8, 1.5],[.85,.15]]
delay_phase_durs = [ [[.200], None], [[.200],None] ]
default_delay_phase_duration = [[.200],None]
long_delay = [[1.3],None] |
6e407739b1b9267ddb0c322cdb7f06ba447d7e426ebd12a3b1de377fc25c59ed | Python | 239 | 7 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files, copy_metadata
hiddenimports = collect_submodules("gdown")
datas = copy_metadata("gdown")
datas += collect_data_files("gdown")
|
a42744aebcb32d2cc35b93fead13c194f2ea6c1b4844d241e9c320a1e267b399 | Python | 239 | 6 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from .initialise import init, deinit, reinit, colorama_text
from .ansi import Fore, Back, Style, Cursor
from .ansitowin32 import AnsiToWin32
__version__ = '0.4.4'
|
c52fdee53324b51d47432f3fbc9e8ee3199d669529d4d4cee9970e9f380865e0 | Python | 243 | 12 | import pickle
def save_pkl(filename, save_object):
writer = open(filename,'wb')
pickle.dump(save_object, writer)
writer.close()
def load_pkl(filename):
loader = open(filename,'rb')
file = pickle.load(loader)
loader.close()
return file |
1834789c24093c39e59b9b5dded756bebb6221de43f79215b6ad5f53ff3f2f1c | Python | 244 | 7 | from pyphi import config
import marshall_intrinsic_units
with config.override(VALIDATE_SUBSYSTEM_STATES=False):
marshall_intrinsic_units.run_binary_units_micro_example()
marshall_intrinsic_units.summarize_binary_units_micro_example()
|
d40c7b0b213beed042f037545490c66988ca8d2264270a199e1a52ab7fe1c7f6 | Python | 244 | 9 | """ubergraph-agent package."""
import importlib_metadata
try:
__version__ = importlib_metadata.version(__name__)
except importlib_metadata.PackageNotFoundError:
# package is not installed
__version__ = "0.0.0" # pragma: no cover
|
6d152c566fbbe7600bc399056287528b08549e9d1947b0e4ad372dac5718c421 | Python | 246 | 13 | """
GO Annotation Review agent module for reviewing GO standard annotations.
"""
from pathlib import Path
THIS_DIR = Path(__file__).parent
DOCUMENTS_DIR = THIS_DIR / "documents"
__all__ = [
# Constants
"THIS_DIR",
"DOCUMENTS_DIR",
] |
dc556609a969ad4026353de57f55de31b98b18bbb8f6939cc33d775927bc1aea | Python | 250 | 8 | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
"""
The MCS class from Lomap shamelessly wrapped and used here to match our API.
"""
from lomap import LomapAtomMapper
|
05af067f204fe349174874c496ec66ab7c219115ca50ddfb8924c1ddfa4b8425 | Python | 251 | 7 | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
from .relative_alchemical_network_planner import (
RHFEAlchemicalNetworkPlanner,
RBFEAlchemicalNetworkPlanner,
)
|
aaa0dc79edc1726ed4d0bb0da0389641d3586a2ea92c3ec51be56e979092ab42 | Python | 251 | 7 | import time
def now():
return time.clock() #Platform-dependent, on windows has high precision. no correspondence to "real" time of day
#return time.time() # Platform-invariant, but low resolution on windows
def now2():
return time.time()
|
691411f352b8dfaa574fd558e42704edcfd815ac1b6c57cde266ff71a36c7f49 | Python | 252 | 10 | "Architectures for convolutional layers"
from ._base import BaseGCNStack, _GCNStackMeta
from ._sage import SAGEConvStack
from ._gin import GINConvStack
__all__ = ["BaseGCNStack", "SAGEConvStack", "GINConvStack"]
# TODO: eventually migrate out DGL?
|
5127e81dc61331394f25a33df813e4b1bddab01a0377b6a6a929c721b83d618b | Python | 253 | 9 | # Use TypedDict for metadata
from typing_extensions import TypedDict
MetadataDict = TypedDict("Metadata", {"difficulty": str, "type": str})
def metadata(difficulty: str, type: str) -> MetadataDict:
return {"difficulty": difficulty, "type": type} |
a7d3f620f6c3271d7d28623ae5d2e47dd5f78390540e3928c86cbe0e566308e6 | Python | 253 | 14 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from os import path
import json
def load_atlas(name):
fname = f"{path.dirname(__file__)}/atlas/{name}.json"
with open(fname) as f:
return json.load(f)
if __name__ == '__main__':
pass
|
6e265d109110046abc03e37ba28a68b22a5e1b39921dd234597eb492597f004b | Python | 255 | 12 | """For when pip wants to check the date or time.
"""
import datetime
def today_is_later_than(year, month, day):
# type: (int, int, int) -> bool
today = datetime.date.today()
given = datetime.date(year, month, day)
return today > given
|
155272807a04c42cf22cb35b9a058fdc014da3d8b2f246b98822d6de9ed4caa0 | Python | 256 | 12 | import pytest
from truesight.dataset.gsm8k import GSM8kGenerator
@pytest.mark.asyncio
async def test_basic():
generator = GSM8kGenerator(
preference_prompt="hello",
model_id="gpt-4o-2024-08-06",
)
await generator.generate(5)
|
57c70eaaf2074de9e35a98c74e202762d135db87b9b42d452e2dff27d84433f2 | Python | 257 | 14 | """
Hi-Compass Predicting Module
This module provides functionality for Hi-C prediction from genomic features.
"""
from .PredictDataset import PredictDataset
from .PredictModel import PredictModel
__all__ = [
'PredictDataset',
'PredictModel',
]
|
9789144cecc4d46bf29d5fe0fdfd0d09cbb984b7889a9fb0cecf6ce1a8d72d7c | Python | 262 | 11 | """Test the tracking models."""
from absl.testing import parameterized
from tensorflow.python.framework import test_util as tf_test_util
from keras import keras_parameterized
from tensorflow.keras import backend as K
from deepcell.model_zoo import tracking
|
a3272cdb882285aa89b5458e33b63f2301609e3efe483e71b5f8e8169cd20faf | Python | 263 | 7 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files, copy_metadata
hiddenimports = collect_submodules("raidionicsseg")
datas = copy_metadata("raidionicsseg")
datas += collect_data_files("raidionicsseg")
|
b5adb670514ba1b835481b6c526d4e33ee3ed24e0cd8da3863d8570c27cb0b72 | Python | 263 | 8 | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
from .plugins import OFECommandPlugin
from . import commands
from importlib.metadata import version
__version__ = version("openfe")
|
a9c3105145cee88877e84a658f2b747d8be9f3537fd2333060f4ac9dc295c2d7 | Python | 264 | 12 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
from pylab import *
def pylab_eval(expr, **variables):
return eval(expr, None, variables)
if __name__ == '__main__':
pass
|
cb4e6a88ea45da1e8462a82592095833908d240ebd752faf0430d9be69fead8c | Python | 266 | 7 | from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_data_files, copy_metadata
hiddenimports = collect_submodules("raidionicsrads")
datas = copy_metadata("raidionicsrads")
datas += collect_data_files("raidionicsrads")
|
583ed0568864fe45b65d2257980215c9c698a7060bda5f4d1820b934d8687f74 | Python | 268 | 12 | """Builtin Datasets"""
from .dynamic_nuclear_net import (
DynamicNuclearNetSample,
DynamicNuclearNetSegmentation,
DynamicNuclearNetTracking
)
from .tissue_net import TissueNet, TissueNetSample
from .spot_net import (
SpotNet,
SpotNetExampleData
)
|
0894ffc58e7736eedf76e5fda8c57455a104e3e9dc7f6b7976f2daab55a27c76 | Python | 269 | 9 | from gufe import LigandAtomMapping
from .ligandatommapper import LigandAtomMapper
from .lomap_mapper import LomapAtomMapper
from .perses_mapper import PersesAtomMapper
from kartograf import KartografAtomMapper
from . import perses_scorers
from . import lomap_scorers
|
420280b3939a450ef577183727a76b04b346b4c635a36e9f9777f788a0231902 | Python | 269 | 10 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152.rh.mz3')
gl.overlayload('motor_4t95mesh.mz3')
gl.overlaycolorname(1, 'red')
gl.shaderxray(0.9, 0.5)
gl.azimuthelevation(110, 15)
gl.meshcurv()
gl.shadername('MatCap');
gl.shadermatcap('MetalShiny');
|
0119b53bcce4d2cb065508a11cc4369df48fa0ee4d2092dcaf7d8d48fc6bd8a0 | Python | 270 | 12 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152Right.mz3')
gl.overlayload('motor_4t95vol.nii.gz')
gl.overlayminmax(1,2,12)
gl.overlaycolorname(2, 'Red-Yellow')
gl.azimuthelevation(110, 15)
gl.shadername('MatCap');
gl.meshcurv()
gl.overlaytranslucent(2, 1)
|
25ab2f81d7eb8c08cbae853e5448cb9bcbde84e65fa3980788f2b2cabace9702 | Python | 270 | 9 | import gl
gl.resetdefaults()
#opacity adjusts whether overlays are translucent (0)
opacity = 50
pth = '/Users/chris/Downloads/sf/'
gl.meshload('BrainMesh_ICBM152_smoothed.mz3')
gl.overlayload(pth+'region.mz3')
gl.overlayload(pth+'stat.mz3')
gl.overlayoverlapoverwrite(0) |
cf4e4b92830d1c490706f7d05ec2ea066fa00dbfcb2bd53a2bfccda31b167b7e | Python | 270 | 11 | #!/usr/bin/env python
from forcebalance.molecule import *
from forcebalance.nifty import _exec
#Run calculation
_exec("psi4 -n 8 eth.psi4in eth.psi4out")
#Get ouptut and write qdata.txt file
mol_out = Molecule("eth.psi4out")
mol_out.write("qdata.txt", ftype="qdata")
|
6138ab3ddc71e6d606afcf791b4a8724c8f58d5c785d11e7418a1b2a242ff231 | Python | 272 | 5 | from datasets import load_dataset
COT_SUFFIX = "Provide your reasoning in <think> tags. Write your final answer in <answer> tags. Only give the numeric value as your answer."
COT_PROMPT_TEMPLATE = "{question} " + COT_SUFFIX
DATASET = load_dataset("openai/gsm8k", "main")
|
b2db716f07500d04b3c782e148d048938ece9bc85b97e7e3880ef2ab6190f411 | Python | 275 | 14 | #!/usr/bin/env python
from __future__ import print_function
import numpy as np
QM_MM = np.loadtxt('EnergyCompare.txt')
QM_Wt = np.zeros_like(QM_MM[:,3]) + 1.0
QM_Wt /= np.sum(QM_Wt)
D = QM_MM[:,0]-QM_MM[:,1]
D -= np.mean(D)
D /= 4.184
D = np.abs(D)
print(np.dot(D,QM_Wt))
|
fb229e15f6927a866d293c9769c0d7d29228fe503e172a11b6147e6a6bdc43a3 | Python | 275 | 11 | # compute mutual information score
import numpy as np
from sklearn.metrics import mutual_info_score
def calc_MI(x, y, bins):
c_xy = np.histogram2d(x, y, bins)[0]
mi = mutual_info_score(None, None, contingency=c_xy)
return mi
py_mi = calc_MI(veci, vecj, nbins)
|
200b6c8e2e1aba0406100bb0c3d233ef864a7ff6a6281750ef8d1792fe340394 | Python | 277 | 11 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os.path as path
__author__ = 'herrlich10 <herrlich10@gmail.com>'
with open(path.join(path.dirname(path.realpath(__file__)), '__version__')) as f:
__version__ = f.readline().strip()
if __name__ == '__main__':
pass
|
2072feb3e790b906d2908ab0fd5e107fd69c067a411c0f38c0c2909b076f4ec3 | Python | 277 | 16 | __all__ = []
from . import _ml
from ._ml import *
from . import _venn
from ._venn import *
from . import _std
from ._std import *
from . import _graphs
from ._graphs import *
__all__ += _ml.__all__
__all__ += _venn.__all__
__all__ += _std.__all__
__all__ += _graphs.__all__
|
cb21c97b7c00e171de121e2e301663c6bb67f44a8072f093b8779cfb1ca3ee96 | Python | 277 | 13 | import sys
import PyInstaller.__main__
# Set recursion limit early
sys.setrecursionlimit(10000)
print("Recursion limit before build:", sys.getrecursionlimit())
PyInstaller.__main__.run([
'--log-level=INFO',
'--noconfirm',
'--clean',
'assets/main_arm.spec'
])
|
01fcf3a11206c1569bc74d7ed0839d04ac5108fc6477b52b1715445b3ee787f5 | Python | 278 | 6 | channel_config = {
"colors" : ["gcamp", "isos"], #needs to stay in this order
"gcamp" : {1 : {"_4701", "_470A" ,"_465A"},
2 : {"_4702", "_470B", "_465B"}},
"isos" : {1 : {"_4051", "_405A"},
2 : {"_4052", "_405B"}}} |
ca90fa21e119ae669f7dbceb5955268fe665b4e12bf6ebb4f546e9575bfd6a13 | Python | 278 | 12 | from setuptools import setup, find_packages
# Read dependencies from requirements.txt
with open("requirements.txt") as f:
requirements = f.read().splitlines()
setup(
name="seege_",
version="0.1.0",
packages=find_packages(),
install_requires=requirements,
) |
4029a2640101cd8aaa70e7fe23fbf933f3cb1cb57e8e54e957036951d5b4e02c | Python | 280 | 18 | """
=====
Geo
=====
Welcome to Geo - an example template / easter egg.
Theme courtesy of the wonderful Geo for Bootstrap theme:
http://code.divshot.com/geo-bootstrap/
"""
import os
template_parent = "original"
template_dir = os.path.dirname(__file__)
base_fn = "base.html"
|
fdc6aff50e2de7861b30f63a508afd21abd610fffb7310e00d063b2509e6afdf | Python | 281 | 14 | import pytest
from openff.nagl.label.dataset import LabelledDataset
@pytest.fixture(scope="function")
def small_dataset(tmp_path):
smiles = ["C", "CC"]
dataset = LabelledDataset.from_smiles(
tmp_path,
smiles,
mapped=False
)
return dataset |
6a2ff814b0773219b86e31e283dd5b6e02343363123d41ddc33d3977788c1462 | Python | 283 | 11 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152.rh.mz3')
gl.overlayload('motor_4t95mesh.mz3')
gl.overlaycolorname(1, 'red')
gl.shaderxray(0.9, 0.5)
gl.azimuthelevation(110, 15)
gl.shadername('MatCap');
gl.shadermatcap('Cortex');
gl.meshcurv()
gl.overlaytranslucent(2, 1)
|
aa6697158fca28643de48f34255566e1cef6aa5d3bce6eda3274392aacd3dec9 | Python | 283 | 11 | """Config classes for defining optimizers"""
import typing
from openff.nagl._base.base import ImmutableModel
class OptimizerConfig(ImmutableModel):
"""The configuration for the optimizer to use during training"""
optimizer: typing.Literal["Adam"]
learning_rate: float |
dd2445858cff161bac0520308e4e4a07610f14f597fc0960bed49220e9c179e6 | Python | 285 | 11 | from pathlib import Path
from dotenv import load_dotenv
import pytest
import os, certifi
os.environ["SSL_CERT_FILE"] = certifi.where()
@pytest.fixture(scope="session", autouse=True)
def load_env():
"""Load environment variables from .env file for all tests."""
load_dotenv()
|
f245510eef9e9715ecfd5219d27696e5cc21a04b0690b724ba33ce5aec8d7ddd | Python | 285 | 11 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152Right.mz3')
gl.overlayload('motor_4t95mesh.mz3')
gl.overlaycolorname(1, 'red')
gl.shaderxray(0.9, 0.5)
gl.azimuthelevation(110, 15)
gl.shadername('MatCap');
gl.shadermatcap('Cortex');
gl.meshcurv()
gl.overlaytranslucent(2, 1)
|
11aa4be8ea1ab1e9b873d0254fbdc51d190f1406d6234a91076dd5ff9bc030d1 | Python | 291 | 11 | """Benchmarks for OpenFF protein force fields"""
# Add imports here
# Handle versioneer
from ._version import get_versions
from .proteinbenchmark import *
versions = get_versions()
__version__ = versions["version"]
__git_revision__ = versions["full-revisionid"]
del get_versions, versions
|
413a478bb9837b8050af0a0b08ff06b93b0d5f1fac38144e76a224e6afc19ad6 | Python | 293 | 9 | def get_mem_mb(wildcards, attempt):
"""
To adjust resources in the rules
attemps = reiterations + 1
Max number attemps = 8
"""
mem_avail = [2, 4, 8, 16, 64, 128, 256]
# print(mem_avail[attempt-1] * 1000, attempt, mem_avail)
return mem_avail[attempt - 1] * 1000
|
47876c8ab378f8784245eb2f2c834fee81a43720f3fce62180f4722260962635 | Python | 294 | 12 | from .logging import setup_logging
from .kfold import train_kfold,kfold_split_dataset
from .eval_vis import plot_kfold_comparison, plot_training_curves
__all__ = [
'setup_logging',
'train_kfold',
'kfold_split_dataset',
'plot_kfold_comparison',
'plot_training_curves'
] |
b07fc6d99e0f11a888e949b32c71d47eab2ed63f20f51556d89beccc6c19f102 | Python | 295 | 15 | """
=========
gathered
=========
This theme extends 'default'. Unlike 'default', it organizes all sections
under the 'Detailed Statistics' header, rather than grouping them by
module.
"""
import os
template_dir = os.path.dirname(__file__)
template_parent = "original"
base_fn = "base.html"
|
65ac5cd4c9634e4a71f36c92465b1444c7181fea60d5898f87d026fe4d88e7da | Python | 297 | 11 | import numpy as np
test_int_types = [int, np.int16, np.int32, np.int64]
class MultiGeometryTestCase:
def subgeom_access_test(self, cls, geoms):
geom = cls(geoms)
for t in test_int_types:
for i, g in enumerate(geoms):
assert geom.geoms[t(i)] == g
|
504500484e05707d8a7f5b8a134f8dc2d9a66eabcf074e81a4132a4eb3ca5b60 | Python | 298 | 7 | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
from . import custom_typing
from .optional_imports import requires_package
from .remove_oechem import without_oechem_backend
from .system_probe import log_system_probe
|
09ff688d3cbf815819fec968507b573d7deeb09e05c61259fd41f3892a822df2 | Python | 299 | 14 | import sys
import numpy as np
MC_file=sys.argv[1]
FD_file=sys.argv[2]
mc_data = np.loadtxt(MC_file)
fd_data = mc_data[1:, :] - mc_data[0:-1, :]
fd_data[:, :3] *= 35
fd_data = np.abs(fd_data)
fd_data = fd_data.sum(axis=1)
fd_data = np.insert(fd_data, 0, 0)
np.savetxt(FD_file, fd_data, fmt="%.7f") |
4c00f32e3924fdcb42e919a8635e758f6037fe6259138180945e2751ca68d8c7 | Python | 299 | 10 | from config import *
from analog_reader import AnalogReader
from valve import Valve
from light import Light
from opto import Opto
from audio import Speaker
from cameras import default_cam_params, PSEye
from communications import SICommunicator
from mp285 import MP285
from actuator import LActuator
|
a355e51d5cfd07a1e4acdb5abbe7a0db004a16dbac48129875b9d34114c1f622 | Python | 304 | 19 | #!/usr/local/bin/python2.0
import os, sys
from string import *
argv=sys.argv
argc=len(argv)
raw = map(split, open(argv[1]).readlines())
for line in raw:
print line[-1],
m=1
for token in line[:-1]:
if atof(token) != 0:
print "%d:%s"%(m,token),
m=m+1
print
|
d0ad362740222f5f1154d8c7d13fbb911a04baa3a6d24f756684d4c54129c1d1 | Python | 304 | 7 | """Metrics have been moved to deepcell_toolbox.metrics."""
from deepcell_toolbox.metrics import PixelMetrics
from deepcell_toolbox.metrics import ObjectMetrics
from deepcell_toolbox.metrics import Metrics
from deepcell_toolbox.metrics import split_stack
from deepcell_toolbox.metrics import match_nodes
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.