sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
48ddef85b2db6707af02875db6adf165e12a6da0d6ad1542a0d6582e01a6540e
Python
218
7
"""Deprecated module for BaseLanguageModel class, kept for backwards compatibility.""" from __future__ import annotations from langchain_core.language_models import BaseLanguageModel __all__ = ["BaseLanguageModel"]
448399c1aab758673b24b240afd356c7003557547d8b3b440778b58c68371a04
Python
219
8
from langchain_core.tracers.langchain import ( LangChainTracer, get_client, log_error_once, wait_for_all_tracers, ) __all__ = ["LangChainTracer", "get_client", "log_error_once", "wait_for_all_tracers"]
45dac2227cb94ef42e1bb58c80a4d6a5e737abdf61414d6e6fa09c1735bf824c
Python
219
12
import pytest from hbayesdm.models import rdt_happiness def test_rdt_happiness(): _ = rdt_happiness( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
4aed0a8f35f4c19513286d3f6c3004c043df70e477e9b2d2e1940ed6e2aa0eb9
Python
219
6
from InitFunctions.Gaussian import * from InitFunctions.Dirac import * from InitFunctions.Brunel import * from InitFunctions.Identity import * from InitFunctions.Uniform import * from InitFunctions.Dirac_Sparse import *
52a194e87a259cd01829297075bfaa53b03ed67e3116599a10d8aebaf1c0edc2
Python
219
12
import pytest from hbayesdm.models import igt_pvl_decay def test_igt_pvl_decay(): _ = igt_pvl_decay( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
9e169206c5b7989a2baf79a4bca43fe272f4a0e72be4e785ac14e2e95ef1463f
Python
219
12
import pytest from hbayesdm.models import igt_pvl_delta def test_igt_pvl_delta(): _ = igt_pvl_delta( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
bd491fd55d67069ca8e215f76cd687ff93a3e7d540737e8f983d72a7180a474d
Python
219
6
from langchain_classic.agents.agent_types import AgentType from langchain_classic.agents.types import AGENT_TO_CLASS def test_confirm_full_coverage() -> None: assert list(AgentType) == list(AGENT_TO_CLASS.keys())
ca70017c37c9dbd3f0b9759a4b0a7a9d61fd52523317a0a26b42d18e5886d7a1
Python
219
12
import pytest from hbayesdm.models import dd_hyperbolic def test_dd_hyperbolic(): _ = dd_hyperbolic( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
0ccbe33aa47d749e80b62d30d6b35b89edfd3f9186c771a2286dba470944d4c3
Python
220
6
from neuralpredictors.layers.readouts import MultiReadoutBase from neuralpredictors.layers.readouts.gaussian import FullGaussian2d class MultiReadoutFullGaussian2d(MultiReadoutBase): _base_readout = FullGaussian2d
26265d439bb51b1dfc38537558b2b4cbd91fd711f410bcc164a50ff73c64cdc8
Python
220
10
#!/usr/bin/env python import pstats p = pstats.Stats('profile.out') p.strip_dirs().sort_stats(-1).print_stats() nreport = 100 p.sort_stats('cumulative').print_stats(nreport) #p.sort_stats('time').print_stats(nreport)
47bb160e3eb363e4ed63c89286f5d4fe29512be2e7a4820bc941255c82f4eee8
Python
220
11
## Params for dnn pathway v4 - network3 alpha = 0.001 epochs = 50 batch_size = 128 activation = 'elu' epochs_prime = 25 alpha_prime = 0.001 dense1_neurons = 1000 dense1_dropout = 0 prepath_neurons = 0 epochs_prime2 = 20
2956e22cead21c49a9ebfb1fcab58e86cee0394cdc16f7fa72b702e3e4ca33e3
Python
222
12
import os import sys import re import types import itertools from cgatReport.Tracker import * from RnaseqReport import * class ExonValidationSummary(RnaseqTracker, SingleTableTrackerRows): table = "exon_validation"
60c413b2307e40239a1903190c0cc4fa46fb66a253c6eddb529eb1acec227831
Python
222
12
import pytest from hbayesdm.models import prl_fictitious def test_prl_fictitious(): _ = prl_fictitious( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
b2585b5a7e5278d75fe2e4bc22cedb879d5ca2920ff9e1e3aa11704af10f64b1
Python
222
12
import pytest from hbayesdm.models import pst_gainloss_Q def test_pst_gainloss_Q(): _ = pst_gainloss_Q( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
b4976af048e39f68736f617589fedde1e2993f44465a3cf12ed94a496f4a0691
Python
222
8
from qtpy import QtWidgets, QtCore class ClickLabel(QtWidgets.QLabel): clicked = QtCore.Signal() def mousePressEvent(self, event): self.clicked.emit() QtWidgets.QLabel.mousePressEvent(self, event)
447f7fb9b117e8c6fa915fdf3e55ec52a10f0efa061c7806a83c6c3f5e3ddee2
Python
223
10
from langchain_core.prompts import PromptTemplate prompt_template = """Write a concise summary of the following: "{text}" CONCISE SUMMARY:""" PROMPT = PromptTemplate(template=prompt_template, input_variables=["text"])
dd1673653f10c281753dee33491c0b35946841e4c9295089fd8c252bdc8c7be7
Python
223
10
class InconsistentDataException(Exception): """ Raised when (parts of) a Dataset is inconsistent """ class DoesNotExistException(Exception): """ Raised when (parts of) a Dataset does not exist """
0b81efb88e0af31cf4f84e5a346ef01ecff6994e8a64c8a12e0cac878017c562
Python
224
6
""" This module represents a pytorch re-implementation of scipy's `scipy.optimize._lsq` module. Some of the code is borrowed directly from the scipy library (all rights reserved). """ from .least_squares import least_squares
6f4d29b774d09bb38fd5dacdd7c9701d1ba6c597d68ce4af6b6b0b2e330dc1b2
Python
224
6
NB_NRN = 16 NB_FRAME_PER_BUFFER = 190 DATAWIDTH_BIT_FRAME = 32 DATAWIDTH_BYTE_FRAME = int(DATAWIDTH_BIT_FRAME/8) SIZE_BYTE_FRAME = (1+NB_NRN)*DATAWIDTH_BYTE_FRAME # +1 for time stamp
c9352838c12439f9b2d164d9f975569008b2fc11f1c461d97775dbf77a60c9be
Python
224
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()
3b6b3ef271e5c80be2689fc3a691fd1ea206b2fb9266282db0086db3738ad5c3
Python
225
12
import pytest from hbayesdm.models import hgf_ibrb_single def test_hgf_ibrb_single(): _ = hgf_ibrb_single( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
3e7f9dc6243933d9a70e80aee0afd94fdcf4690fbdadeae4f4b73b6162af76a4
Python
225
12
import pytest from hbayesdm.models import bandit4arm_4par def test_bandit4arm_4par(): _ = bandit4arm_4par( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
5c3c8d3a78cf16482687d0cd01d88b3880514fd58b7434ee6e1832d0f7289d17
Python
225
11
# Accept all incoming requests c.NotebookApp.ip = "*" c.NotebookApp.port = 8888 c.NotebookApp.open_browser = False c.MultiKernelManager.default_kernel_name = "python3" c.NotebookApp.token = "" c.NotebookApp.password = ""
e97e798190623e4916d7830c9a5587b4f7f3298e4ba410a4714aa47814f44d65
Python
225
12
import pytest from hbayesdm.models import banditNarm_4par def test_banditNarm_4par(): _ = banditNarm_4par( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
4ce3226d9e8dcd6aaffa1cfc15e2e81a5537e8495ac6b54abc803b8e7fab948b
Python
226
9
from langchain_core.tracers.log_stream import ( LogEntry, LogStreamCallbackHandler, RunLog, RunLogPatch, RunState, ) __all__ = ["LogEntry", "LogStreamCallbackHandler", "RunLog", "RunLogPatch", "RunState"]
880e4d2876d883c3a428f73166b7f025b320219da9eca699efde2f3660be0da1
Python
226
10
import sys import numpy as np import voxcell as vc vd = vc.VoxelData.load_nrrd(sys.argv[1]) dat = np.loadtxt(sys.argv[2],dtype='int32') ix = dat.reshape(-1,3) reg = vd._lookup_by_indices(ix) np.savetxt(sys.argv[3],reg,"%d")
7f5af558b055672676e80dbfb640a13e93164ede423366570633c186e2a6b483
Python
227
7
import glob from os.path import dirname, basename, isfile, join modules = glob.glob(join(dirname(__file__), "*.py")) __all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] from . import *
8e7f83180ea949efddaa5f4d719650d917b729dac03882888c9551be4ad3e6cc
Python
227
8
__version__ = '1.0.5' # from pathlib import Path # import subprocess # # __version__ = subprocess.check_output( # ["git", "describe", "--tags"], # cwd=Path(__file__).parent.parent.absolute() # ).strip().decode('UTF-8')
0268fe9f319595193648104a2e56578a46585a0a3d29ba18122de42b99cc0e0b
Python
228
12
import pytest from hbayesdm.models import bandit2arm_delta def test_bandit2arm_delta(): _ = bandit2arm_delta( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
0f73c3b86b954032a7a0607fa0894de7ee75dddb241db9d4626a9a7847ea5308
Python
228
7
from langchain_classic.schema.runnable.passthrough import __all__ EXPECTED_ALL = ["RunnableAssign", "RunnablePassthrough", "aidentity", "identity"] def test_all_imports() -> None: assert set(__all__) == set(EXPECTED_ALL)
3929bea50991b176a59b5e0b7629d47e352f86cc04f8ee2451ff61a665cd45ae
Python
228
12
import pytest from hbayesdm.models import banditNarm_delta def test_banditNarm_delta(): _ = banditNarm_delta( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
4861376660dfbdff5105b9db5f9315dd48a9709e8089497d9d0a9e14bb08efd7
Python
228
12
import pytest from hbayesdm.models import banditNarm_lapse def test_banditNarm_lapse(): _ = banditNarm_lapse( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
b1592641bb40634d94d73a33979a25d2fdfe71546525f129024195757afacd20
Python
228
12
import pytest from hbayesdm.models import bandit4arm_lapse def test_bandit4arm_lapse(): _ = bandit4arm_lapse( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
b44b5b66f6d509f0be75487ca4ea4cbac451592dbd0764fbf8702740cd920d9f
Python
228
12
import pytest from hbayesdm.models import prl_rp_multipleB def test_prl_rp_multipleB(): _ = prl_rp_multipleB( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
b8d3884dd6d6c15cf8bd704aebd62b415dded3757de59d2e62609e445f9eab53
Python
228
12
import pytest from hbayesdm.models import dbdm_prob_weight def test_dbdm_prob_weight(): _ = dbdm_prob_weight( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
ea0f043531d10502ed685737f5afa69077b3caa1329a738916ad3af96395ae60
Python
229
7
from langchain_core.output_parsers.openai_tools import ( JsonOutputKeyToolsParser, JsonOutputToolsParser, PydanticToolsParser, ) __all__ = ["JsonOutputKeyToolsParser", "JsonOutputToolsParser", "PydanticToolsParser"]
30c06409aebd3b5513f1ca9599acc4805092444b36f4c8529916a37e65dfe69d
Python
230
11
import numpy as np from paths import TRAINING_DATA_PATH PATH = TRAINING_DATA_PATH + "/ALL/ALL.npz" spectra = np.load(PATH)["spectra"] oxy = np.load(PATH)["oxy"] np.savez(PATH, spectra=spectra, oxygenation=oxy)
693f8ad41cb441723bae6786cca0e3052d939b21224a230fbb4f7c299dc0aee6
Python
230
11
import numpy as np from ZScore import z_score x = np.array([1,2,3,4,5,6,7,8,9,10]) y = np.array([2,4,6,8,10,12,14,16,18,20]) print(np.corrcoef(x,y)) print(np.std(x)) print(np.std(y)) print(z_score(x)) print(z_score(y))
df93258e1dcdad64fc198cdca5f0e36a596c3b80c3050561bd1e007b9d9cd35f
Python
230
8
prompt_template = """Given the following question and context, return YES if the context is relevant to the question and NO if it isn't. > Question: {question} > Context: >>> {context} >>> > Relevant (YES / NO):""" # noqa: E501
11d5dcc28087b311e0a5668d18fc97c0b3f9a95817136c2f0f8fe4fb6c7440b8
Python
231
12
import pytest from hbayesdm.models import prl_fictitious_rp def test_prl_fictitious_rp(): _ = prl_fictitious_rp( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
49fe9c6286cdffc712bba5f5247948c1838d69c0e5b9cacd1da21938d6a8d305
Python
231
10
import glob from os.path import dirname, basename, isfile, join modules = glob.glob(join(dirname(__file__), "*.py")) __all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] from . import *
500a042f4a7fffa679cb1e4004dc28fc82ff81ee10096101c466796c3a808c87
Python
231
12
import pandas as pd import numpy as np a = np.zeros(40) + 0.6 df = pd.DataFrame(a,columns = ['Mean']) df['StD'] = 0.1 df['SM'] = 0.1 df['SS'] = 0.1 df['PM'] = 0 df['PS'] = 0 df.to_csv('./required_files/Values.csv', index = False)
6ea7a4cf15692040531ec1ebd4cd7665ec482b3639429b03c38605f11e777046
Python
231
14
from langchain_core.load import __all__ EXPECTED_ALL = [ "InitValidator", "Serializable", "dumpd", "dumps", "load", "loads", ] def test_all_imports() -> None: assert set(__all__) == set(EXPECTED_ALL)
ca2a45905026b72d313bc813fa32b50127cf9c5b34b8dd89e3a78c1357a20ed4
Python
232
9
from setuptools import setup setup(name='SSCD', #version='0.1', #url='https://github.com/zzh8829/yolov3-tf2', #-author='Zihao Zhang', #author_email='zzh8829@gmail.com', #packages=['yolov3_tf2'] )
fa29c12cca18a2442c372648f436680e208f15970294659e1ec837fd7d3da794
Python
232
8
from typing import Any, Dict, List class LRPStrategy: def __init__(self, layers: List[Dict[str, Any]] = None, pooling: List[Dict[str, Any]] = None): self.layers = layers self.pooling = pooling
bc50adf4e1c9cb41dd4ab1eadb5cab4320447dfc2074c1f8a52dae35318eb990
Python
233
12
import pandas as pd import numpy as np a = np.zeros(40) + 0.5 df = pd.DataFrame(a,columns = ['Mean']) df['StD'] = 0.06 df['SM'] = 0.1 df['SS'] = 0.01 df['PM'] = 0 df['PS'] = 0 df.to_csv('./required_files/Values.csv', index = False)
0244a53c89cda1e1acfcd6902a1ad0fb7282fa3583ab13bd309c8c6d387f3587
Python
234
8
"""A tracer that runs evaluators over completed runs.""" from langchain_core.tracers.evaluation import ( EvaluatorCallbackHandler, wait_for_all_evaluators, ) __all__ = ["EvaluatorCallbackHandler", "wait_for_all_evaluators"]
10f061b91598576c03d17f41a8c4f9703fb6217769919f4c1157c0a0b8cdf8d3
Python
234
12
import pytest from hbayesdm.models import prl_fictitious_woa def test_prl_fictitious_woa(): _ = prl_fictitious_woa( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
b0c847f7de47f3140ccd151750aa2a841589f427ba801863e13b9108355c1c83
Python
235
8
# import os def get_datadir(): """Returns the data directory of this package""" return os.path.join(os.path.dirname(__file__), 'data') from ._version import get_versions __version__ = get_versions()['version'] del get_versions
114ee2b7fda939132da7f023a596cc011c640abc872120228f89bf9b71af5497
Python
237
13
#!/usr/bin/python import sys import json doc = json.loads(sys.stdin.read()) if 'start' in doc['input']: sums = 1 else: sums = doc['input']['sum'] + 1 output = { "output": { "sum": sums } } sys.stdout.write(json.dumps(output))
ed99abf37b2be89fc415225a34e7df774106cd4c6fd1a6ea8815497dcb6d57f0
Python
237
12
import pytest from hbayesdm.models import choiceRT_ddm_single def test_choiceRT_ddm_single(): _ = choiceRT_ddm_single( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
2dc72e1c13d947398be1dd44320650358d8f8d937f36cabb3feed0041d2cdedb
Python
238
12
## Params for dnn pathway v5 - network2 alpha = 0.001 epochs = 50 batch_size = 128 activation = 'elu' epochs_prime = 25 alpha_prime = 0.001 dense1_neurons = 1000 dense1_prime = 0 prepath_neurons = 10 epochs_prime2 = 20 dense1_dropout = 0
04ca5417a4ef59e78f192b2a874d5312068c52640f4a2c3ffa7647eea083cd5a
Python
240
5
import morgana.ImageTools.morphology.anchorpoints import morgana.ImageTools.morphology.computemorphology import morgana.ImageTools.morphology.meshgrid import morgana.ImageTools.morphology.midline import morgana.ImageTools.morphology.spline
3edd5d7585a8a543c81d9f1f9edf5398bbccfd04a9e636a67f3775f568e4b127
Python
240
8
import morgana.GUIs.fluo import morgana.GUIs.inspection import morgana.GUIs.mainwindow import morgana.GUIs.manualmask # import orgseg.GUIs.spot import morgana.GUIs.visualize0d import morgana.GUIs.visualize1d import morgana.GUIs.visualize2d
6f18dcd37bf9bc8f4ac7a2e99dfc39527f88e24fc20efd77a904caaa874204c7
Python
240
12
import pytest from hbayesdm.models import dd_hyperbolic_single def test_dd_hyperbolic_single(): _ = dd_hyperbolic_single( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
86d30bc7b981c74bae6c7c4de3dac5b29fe546a93f988b9444af6974bbd58a7d
Python
241
11
import numpy as np from sklearn.base import BaseEstimator class DummyModel(BaseEstimator): def predict_proba(self, X): return X def fit(self, X, y): self.classes_ = np.array([0, 1]) return self
26b3b6e11de6e84e23738b1a98d08967dee0d57afabf52d116b99c13cecf2727
Python
242
5
from CEL.utils.register import register def load_model(dataset, ds_config, model_config): model_name = model_config.name model = register.models[model_name](ds_config.name, dataset=dataset, **model_config[model_name]) return model
920bb3eac7d1379d45b3f04f03350a7a05f022e206eb967724957ff7fba10a21
Python
242
8
"""Test the cohere reranker.""" from langchain_classic.retrievers.document_compressors.cohere_rerank import CohereRerank def test_cohere_reranker_init() -> None: """Test the cohere reranker initializes correctly.""" CohereRerank()
3b678e984f6c299699fa52b695875859baa3c5eec7c11f7934c8592fb4447b89
Python
243
12
import pytest from hbayesdm.models import banditNarm_2par_lapse def test_banditNarm_2par_lapse(): _ = banditNarm_2par_lapse( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
695abb59ebfcd947e3e364306da9cb245da341d53024e2cead59958bfcb3c420
Python
243
12
import pytest from hbayesdm.models import prl_fictitious_rp_woa def test_prl_fictitious_rp_woa(): _ = prl_fictitious_rp_woa( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
8ad5977966c9835adb2adb47c4e9c527aaae8a525fc4faa4968dff1fa28fba9b
Python
243
12
import pytest from hbayesdm.models import bandit4arm_2par_lapse def test_bandit4arm_2par_lapse(): _ = bandit4arm_2par_lapse( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
f76fa4c99fc5bb777161934dfffbd7a68ca47f602ae759eb6741235bfa1a6f44
Python
243
5
# This file is a part of the `allegro` package. Please see LICENSE and README at the root for information on using it. from ._contract import Contracter from ._channels import MakeWeightedChannels __all__ = [Contracter, MakeWeightedChannels]
291db7c8f882bd8354aa543104c83d90692affb29c5c574d184bcd1f2ec5874a
Python
245
11
from setuptools import setup setup( name='synister', version='0.1', description='Neurotransmitter classification', url='https://github.com/funkelab/synister', author='Funkelab', packages=[ 'synister', ])
8bab79be87efd4bd70fc56822b6c7c05ecfea5fa86553702551ab99445d5f775
Python
245
6
from createdir import runBB, parse_bellybuttonseg_args if __name__ == "__main__": args = parse_bellybuttonseg_args('Run BellyButton training on specified file/directory') runBB(train=True, predict=False, file_path=args['file_path'])
c1e54343817c14e584779b19d56f4a63f0b56083d8e8cf8e36dfb7290c3736bb
Python
245
11
from voxcell import VoxelData import sys input_nrrd = sys.argv[1] z_index = int(sys.argv[2]) output_nrrd = sys.argv[3] vd = VoxelData.load_nrrd(input_nrrd) res = vd.raw[z_index,:,:] res_vd = VoxelData(res, (1,1)) res_vd.save_nrrd(output_nrrd)
da7207a52071a518c615560bdda0cad328f94e52adcc5dd11979be9a32206999
Python
245
13
import torch import torchviz from minimal import Synapse pre = torch.arange(3., requires_grad=True) post = torch.arange(5., requires_grad=True) syn = Synapse() delta = syn(pre,post) print delta torchviz.make_dot(syn(pre,post)) #%%
0a9ae025c786cde6cf596088d5dace2869835e5d67ee51c88f2eaa3cf388ddf1
Python
246
12
import pytest from hbayesdm.models import bandit4arm_lapse_decay def test_bandit4arm_lapse_decay(): _ = bandit4arm_lapse_decay( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
324840942a7273db5ed93470b73142e9f0b86ee6d77d00b182bdc9b988ed7a32
Python
246
12
import pytest from hbayesdm.models import banditNarm_lapse_decay def test_banditNarm_lapse_decay(): _ = banditNarm_lapse_decay( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
a17799b221657f254c25bba88f1f9913d5af8c7f06fb051a7a0741591cfae4fc
Python
246
12
#!/usr/bin/python import sys,os from PDBpy import * for fname in os.listdir("."): res = fname.split(".") if(len(res) > 1): if(res[1]=="pdb"): deb=fname.split(".")[0] x = PDB("%s.pdb" % deb, hetSkip = 1) x.out("%s-noHet.pdb" % deb)
bcf6b4c1608adce10da6dbd98db3da94d35e979663a447e2b965dd699b2c1542
Python
246
14
from config import conf from runner import Runner import os binding_site_range = 15.0 out_path = 'trained_model' if not os.path.isdir(out_path): os.mkdir(out_path) runner = Runner(conf, out_path=out_path) runner.train(binding_site_range)
c31d667f948644404795b50e34bf417b0965d114a25aa30febaf0766e8b23b6e
Python
246
13
from pdearena.pl_models.cnnmodel import ( CNNModel, NeuralSolver, NeuralCFL, ShockCast ) MODELS = { "cnn": CNNModel, "neural_solver": NeuralSolver, "neural_cfl": NeuralCFL, "shock_cast": ShockCast, }
d15ac15ef52affb5c0d4266bb27f2e07cdbe0cf256c9362f45fa0fd752ce9701
Python
246
11
from langchain_core.tools import ( create_retriever_tool, render_text_description, render_text_description_and_args, ) __all__ = [ "create_retriever_tool", "render_text_description", "render_text_description_and_args", ]
d2658f620949aadbe46baec6b2349b126314550ff973f7a244bb70e3eb84b99b
Python
247
6
from createdir import runBB, parse_bellybuttonseg_args if __name__ == "__main__": args = parse_bellybuttonseg_args('Run BellyButton prediction on specified file/directory') runBB(train=False, predict=True, file_path=args['file_path'])
35b8df8496e482ba69da7f63bb51bcdf0a781e39074e4b5d2f1e3919b1aace4d
Python
248
5
import NeuronModel from NeuronModel import Hodgkin_Huxley from NeuronModel.Hodgkin_Huxley import hodgkin_huxley_parameters from NeuronModel.Hodgkin_Huxley import mainer_parameters from NeuronModel.Hodgkin_Huxley import neuronal_dynamics_parameters
6883047327635cd6b37ae80a8c95c6f2ddad667553c3ca20a0235a759987f0fe
Python
248
9
# from pycromanager import Dataset # # dataset = Dataset('/Users/henrypinkard/Desktop/ndtiffv3.0_stitched_test_1') from PIL import Image # Open the tiff image pil_img = Image.open('/Users/henrypinkard/Desktop/ndtiffv3.0_test_NDTiffStack(1).tif')
7a02ce13ebc1e5e60ec6c71eba25f75df941e4cf55a96e215842d8170fdd4850
Python
248
6
# This file is a part of the `allegro` package. Please see LICENSE and README at the root for information on using it. from ._version import __version__ from . import _compile from . import _extern __all__ = ["__version__", "_compile", "_extern"]
775cdc5fe2c2e81f98de22470bb915432e9bfd4f3aff1fedd975c4cd0fe35343
Python
249
5
# This file is a part of the `allegro` package. Please see LICENSE and README at the root for information on using it. from .allegro_models import AllegroModel from .param_groups import MuonParamGroups __all__ = ["AllegroModel", "MuonParamGroups"]
cbfe9fb9d09ebd1f6805c4618a5e049805765b1d5d4fcc0c66900466697ead3c
Python
250
15
from .artemis_clip_vinvl_dataset import ArtEmisAttCLIPVinVLDataset __all__ = [ "ArtEmisAttCLIPVinVLDataset", "", ] DatasetMapTrain = { "WESD": ArtEmisAttCLIPVinVLDataset, } DatasetMapEval = { "WESD": ArtEmisAttCLIPVinVLDataset, }
efed27008a03965d735331af8a493c8241e4129135fd146b85ecd687dc1e3e0f
Python
250
9
import os import sys # Appends the root keras-explainability directory to the path def pytest_configure(config): testpath = os.path.dirname(os.path.abspath(__file__)) libpath = os.path.join(testpath, os.pardir) sys.path.append(libpath)
bb2b5cb4b1d5321bd2ff22da21ad8f908477f83702a24a27d5a7fcc807f5f86f
Python
251
12
#!/usr/bin/env python # coding: utf-8 # Copyright (c) venkatesh-sivaraman. # Distributed under the terms of the Modified BSD License. """ Information about the frontend package of the widgets. """ module_name = "emblaze" module_version = "^0.10.5"
37e890174cbe5a88d201c6b9c4a0dad50d119c77c61fdd71ec15f6c9c181bb23
Python
252
12
import pytest from hbayesdm.models import banditNarm_kalman_filter def test_banditNarm_kalman_filter(): _ = banditNarm_kalman_filter( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
87b59aeeb1295aec9b259b3195f96b235cc1ce63abb6c0a3c6f7304ea07fcb44
Python
252
12
import pytest from hbayesdm.models import prl_fictitious_multipleB def test_prl_fictitious_multipleB(): _ = prl_fictitious_multipleB( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
ab3652cb51ee4054c9f7403a98e9763da70b1010b47324b48624ac1f377d9867
Python
252
6
"""**Chat Loaders** load chat messages from common communications platforms. Load chat messages from various communications platforms such as Facebook Messenger, Telegram, and WhatsApp. The loaded chat messages can be used for fine-tuning models. """
bcff0c407ef7b0b7a240422e5cd85b0de1174d7247c7563bd368ce912dd4225c
Python
252
12
import pytest from hbayesdm.models import banditNarm_singleA_lapse def test_banditNarm_singleA_lapse(): _ = banditNarm_singleA_lapse( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
e8c85c95dac6b50d86b435760ae4575adf6ad880e179466a7a08b61147cb24af
Python
252
9
import pickle import os import numpy as np def pre_normalize(eeg_in_volts): root = os.path.dirname(__file__) fname = f'{root}/norm.pkl' with open(fname, 'rb') as f: r = pickle.load(f) return (eeg_in_volts - r['sub']) / r['den']
ed0f3d5d37d663fcf986a8f757722dca89256324d1b0834050486b380eebed80
Python
252
12
import pytest from hbayesdm.models import bandit4arm_singleA_lapse def test_bandit4arm_singleA_lapse(): _ = bandit4arm_singleA_lapse( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
f7784e710e60371c2682357486a7181c94355a413cb5cf09ac042ec0a7f65fcd
Python
252
5
from langchain_core.indexing.api import _abatch, _batch, _HashedDocument # Please do not use these in your application. These are private APIs. # Here to avoid changing unit tests during a migration. __all__ = ["_HashedDocument", "_abatch", "_batch"]
0b5605dbcf8c6d260cfadb4f49c18136642cdbe16f2f5691d0493f7736b89512
Python
254
11
import torch def reduce_edge(inputs, edge_index, output_shape): outputs = torch.zeros( *output_shape, device=inputs.device, dtype=inputs.dtype, ) outputs.index_add_(0, edge_index, inputs) return outputs
aae3128a17513d090b1505e8fd0c0a03fc71a2b58cee8ea2b6e065503bb80923
Python
255
12
import pytest from hbayesdm.models import bandit4arm2_kalman_filter def test_bandit4arm2_kalman_filter(): _ = bandit4arm2_kalman_filter( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
892e1d976681c74fab592f7509090c4d1da9ccb2c0a53b78ef08de21313a505a
Python
257
13
from langchain_core.tracers.stdout import ( ConsoleCallbackHandler, FunctionCallbackHandler, elapsed, try_json_stringify, ) __all__ = [ "ConsoleCallbackHandler", "FunctionCallbackHandler", "elapsed", "try_json_stringify", ]
718d7301d0f8144cf13b7f631164801e784efddd27a9110af3b9a325881f929e
Python
258
11
from langchain_classic.prompts.few_shot import __all__ EXPECTED_ALL = [ "FewShotChatMessagePromptTemplate", "FewShotPromptTemplate", "_FewShotPromptTemplateMixin", ] def test_all_imports() -> None: assert set(__all__) == set(EXPECTED_ALL)
9754faa3402f9c652d910bf21a395d571e01f26c2bb879a84ae644e7a43ef732
Python
258
9
from imagingplus.processing.microscopes import PrairieViewMetadata def test_PrairieViewMetadata(): testdir = '/home/pshah/mnt/qnap/Data/2021-01-28/2021-01-28_PS14_t-002' pvdata = PrairieViewMetadata(pv_xml_dir=testdir) test_PrairieViewMetadata()
eb4a2850dfc17d350f39a7c4d8a7e3d0ac1ef931aa30d5a56f135e1702c24b5e
Python
258
13
""" openff-arsenic Report results for free energy simualtions """ # Handle versioneer from ._version import get_versions versions = get_versions() __version__ = versions["version"] __git_revision__ = versions["full-revisionid"] del get_versions, versions
056fa3812795720d49c51c7d16219a4766153d59f638a285df713b70fad15155
Python
259
6
from createdir import runBB, parse_bellybuttonseg_args if __name__ == "__main__": args = parse_bellybuttonseg_args('Run BellyButton training and prediction on specified file/directory') runBB(train=True, predict=True, file_path=args['file_path'])
50e0e894a135fdc6a891e17178823b9d9dc122e8634061e4a2bcc518d9c222b0
Python
260
4
TRAINING_DATA_PATH = r"H:\learned spectral unmixing\training_processed/" TEST_DATA_PATH = r"H:\learned spectral unmixing\test_final_mp/" MODEL_PATH = r"H:/learned spectral unmixing/models_LSTM_mp/" EXAMPLE_PATH = r"H:\learned spectral unmixing\sample_images/"
98615987d5aad6ec7b9a1af873bd0180a73e330d01d367492cdccbf41432eac7
Python
260
11
import time def log(func): def wrap(*args, **kwargs): start = time.time() result = func(*args, **kwargs) end = time.time() print('Generated', args[0], round(end-start, 2), 's') return result return wrap
cfc265d3ded8c6c7c38f98878b49d94260beedc25df9e0f030438d7103e24aa6
Python
260
11
from langchain_core.runnables.history import ( GetSessionHistoryCallable, MessagesOrDictWithMessages, RunnableWithMessageHistory, ) __all__ = [ "GetSessionHistoryCallable", "MessagesOrDictWithMessages", "RunnableWithMessageHistory", ]
63998b5cfae55a923ab75f8136c0b9028c199f1a9a04dbb19aaaba516ba0ade5
Python
261
10
from voxcell import VoxelData import numpy as np import nrrd import sys input_nrrd = sys.argv[1] output_base = sys.argv[2] vd = VoxelData.load_nrrd(input_nrrd) nrrd.write('{}.nhdr'.format(output_base), vd.raw, detached_header='{}.bin.gz'.format(output_base))
7c834d7884d0481d366519f32ae5684824b375c4b2e652dc38946daf3d828a0c
Python
261
10
import cv2 import numpy as np from src.data.utils import CLASS_COLOR if __name__ == '__main__': for class_name in CLASS_COLOR: img = np.zeros((224, 224, 3)) img[:, :] = CLASS_COLOR[class_name] cv2.imwrite(f'{class_name}.png', img)
07a6bd5b4017f0b24b11f5db0573d4296deab7c789ad737c6d17f6bdb6bd74df
Python
262
8
from .aphynity_exp import APHYNITYExp from .soft_intervention_exp import * from CEL.utils.register import register def load_experiment(dataloader, model, exp_config): exp = register.experiments[exp_config.name](dataloader, model, exp_config) return exp