sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
86d6925512cc8df77565f87613bbadad51407390176d794c54df146d349c1a36
Python
193
10
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.seed = int(argv[1]) msp.run_reconstruction(path="model/msp-274.790a3_1", sparsity=0.178e-2, cl=10_000) msp.run()
c06647236d40daa30452d2f5d6012e13fac2abf7813cfe70b794eed01ec8ec7e
Python
193
5
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu> from ._source import source_results, source_time_lm, source_time_results from ._uts import time_results from ._uv import scatter_table
e2872b58fd890be3cc20921a0a08c1b75c884b7c5a429dd30ffbfbe3dfbdf50d
Python
193
10
# Check if the ray package is available JOBLIB_AVAILABLE = True try: import joblib except ImportError: JOBLIB_AVAILABLE = False def joblib_is_available(): return JOBLIB_AVAILABLE
e9fd715aec57a44fedc4a0905401f05883c423fcf63557b67436f94efaaaa4cc
Python
193
5
def construct(type_map, spec, **default_kwargs): spec = dict(spec.items()) type_name = spec.pop("type") default_kwargs.update(spec) return type_map[type_name](**default_kwargs)
09d529001032b198c3c340b4c5b452979607a1c059716b07ce062158ea26dd52
Python
194
12
from neuron import h instance = h.pp() assert instance.has_loc() == 0 nseg = 1 s = h.Section() instance = h.pp(s(0.5)) assert instance.has_loc() == 1 assert instance.get_segment() == s(0.5)
b7a3c0b46e0d8f6b3219c257fb60e5324054ea02291f0b947b2ffe070769601a
Python
194
8
"""Google Benchmark tooling""" __author__ = 'Eric Fiselier' __email__ = 'eric@efcs.ca' __versioninfo__ = (0, 5, 0) __version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev' __all__ = []
f210b8088de4e1d4c0b6718c79f15a54637e68dea42c021cbe84212a95a44f50
Python
194
3
from __future__ import print_function, division, absolute_import from .resnext101_32x4d_features import resnext101_32x4d_features from .resnext101_64x4d_features import resnext101_64x4d_features
53fd25f4819376e33fde870fcd548afe8bfd22019736349668a2c8e91de3ff13
Python
195
9
import os from os.path import join, dirname REPO_DIR = join(dirname(dirname(os.path.abspath(__file__)))) EM_DATA_DIR = join(REPO_DIR, 'em_data') DATA_DIR = join(REPO_DIR, 'encoding', 'data')
55d8a2bfdba7ead050ca7dc358d2c23d9e72e7f064ad0b9eacceea80286b8ce3
Python
195
11
from sys import argv from msp import MSP from msp_donorlike import setup_as_adjusted_acceptor msp = MSP() msp.file = __file__ msp.seed = int(argv[1]) setup_as_adjusted_acceptor(msp) msp.run()
7e80ca147e1e05f57013d60755a196a3c4eed4d6050dc85ee578a420979ae1c4
Python
195
4
from .fiducialreg import CloudSet, FiducialCloud, GaussFitter3D, RegistrationError __version__ = "0.1.0" __all__ = ("RegistrationError", "CloudSet", "GaussFitter3D", "FiducialCloud", "RegFile")
f437b8d34aa91ac7f87186de578b2ec53eabcd4a5fe334fdebc5df3faf78d022
Python
195
7
from .utils import * from .autoprompt import AutoPrompt from .ipromptx import iPrompt from .gumbel import GumbelPrefixModel from .hotflip import HotFlip from .prompt_tune import PromptTunedModel
72a291c272098b93692e0040a84d5da3d07a0bc12de12fa3fdebd757e2773a56
Python
196
5
# -*- coding: utf-8 -*- # Copyright (c) 2016-2018 Braintech Sp. z o.o. [Ltd.] <http://www.braintech.pl> # All rights reserved. """This package provide ReadManager to MNE conversion utilities."""
a602ff964590d6629fc4f6462d0fab28d929ccd9152271edb3ba33904e346cb9
Python
196
6
"""Config file for pytest for defining additional parser options. """ def pytest_addoption(parser): parser.addoption("--auto_dir", action="store", default="/home/circleci/project/auto-07p")
d4cf493017314e4c2cd6883b3a8c5d9b735b55ae10f31d947202ba39da308d62
Python
196
11
import numpy as np _boundary_mode = 'nearest' _dtype_ = np.float32 _phi_ = np.array([1./16, 1./4, 3./8, 1./4, 1./16], _dtype_) __all__=['_boundary_mode', '_dtype_', '_phi_']
399f57d8e44656a1e931ffefde7009bce449c7d9e1c2bec13652fa6cfdf8464d
Python
197
9
from distutils.core import setup from Cython.Build import cythonize import numpy as np setup( name = "features", ext_modules = cythonize("features.pyx"), include_dirs = [np.get_include()] )
9c000b79be4dcef29522b6203dd74269ec19dbaa778ac1bd988bc5859b977ba6
Python
197
13
from enum import Enum class DeviceState(Enum): NOT_READY = 1 READY = 2 READY_FOR_TRIAL = 3 ACQUIRING = 4 RECORDING = 5 FINISHED = 6 supported_camera_types = ("opencv",)
e836e59797ff5191e51553e7b467d9573d00535bf4d92bc04c04db9aaea9b860
Python
197
3
"""GluonCV motion dataset, supports multiple video tasks including video action recognition/detection, object tracking, pose tracking, etc.""" from .dataset import GluonCVMotionDataset, FieldNames
00404529115ef51d9b07b5110e20b5b98f347d060002d2ae05b6238a0d9ec69e
Python
199
6
from angorapy.tasks.world_building.entities import Robot, Stage, External from angorapy.tasks.world_building.base import PhysicalWorld __all__ = [ "Robot", "Stage", "External", "PhysicalWorld" ]
1fcb57795f1a3726942d13c27035d338cd31671c3e660f48c81c5bdd2bcee71d
Python
199
9
from .image import OMEZarrImage, OMEZarrLabels, OMEZarrMultiscale from .scene import OMEZarrScene __all__ = [ "OMEZarrImage", "OMEZarrLabels", "OMEZarrMultiscale", "OMEZarrScene", ]
22253e9d51780e6641b9e1335681ab24fcca6a5f3867cbb292d29edb9462ec61
Python
199
7
""" Keras layers that handle the node, edge, and connectivity features returned by the preprocessor classes. """ from .graph_layers import EdgeUpdate, GlobalUpdate, NodeUpdate from .layers import *
abd6ff48aa02cb2212abf9630dc4335b0f5ec27d283f13bac85b9c1fd331d6f1
Python
199
6
# -*- coding: utf-8 -*- # @Author : Yue Liu # @Email : yueliu19990731@163.com # @Time : 2022/9/21 20:55 from .visualization import similarity_plot, t_sne __all__ = ['similarity_plot', 't_sne']
c6a4694432641a64d6db537fef3c7917835af860936cdb3a43ab467c89e76675
Python
199
8
"""The default loader used with custom app instances.""" from .base import BaseLoader __all__ = ('AppLoader',) class AppLoader(BaseLoader): """Default loader used when an app is specified."""
cc8e16678490d65319a46278d57cf6dcfe5e1028aaa7dc15dea35d17e4367e62
Python
199
7
import biomedisa def selected_settings(request): # return the version value as a dictionary # you may add other values here as well return {'APP_VERSION_NUMBER': biomedisa.__version__}
e55a165c211023819706a694f4439d648926fff70f99be05c2e0cac397d32010
Python
199
5
from .ripser import Rips, ripser, lower_star_img, correlation_to_distance from ._version import __version__ __all__ = ["Rips", "ripser", "lower_star_img", "__version__", "correlation_to_distance"]
9594a38a92e916f473ea4ae667fac19f88a4e933924380532fc9aef723572797
Python
200
6
# flake8: noqa: F401 from .base import BaseShape, rotate_around_point from .sh_ellipse import Ellipse from .sh_circle import Circle from .sh_polygon import Polygon from .sh_rectangle import Rectangle
db6690cdd9d097aa70943f23a533f77fc5a356e92bf305a91b5b699b08e47205
Python
200
16
from enum import Enum class Safety(Enum): UNSAFE = 2 POTENTIALLY_SENSITVE = 4 SAFE = 6 DEFAULT_SAFETY = Safety.POTENTIALLY_SENSITVE __all__ = ( "DEFAULT_SAFETY", "Safety", )
76e206b00d872ff2e69bb8c71611442632006ff507a1029770041b9b689a9fbb
Python
201
9
from .interpolations import ( deep_intepretation, gp_interpolation, kernel_interpolation, vtk_interpolation, ) from .models import * from .morphometrics import * from .widgets import *
2814d9eda340aeeb52bd9ebb4f49833e0534fd20f3e652a92ad64e11109b6a3d
Python
202
8
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'video_control_ui.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost!
eabb19d6ab50db94eda1866cf73822896bd408b5d40b57bcd3f0c06b5eb45798
Python
202
3
from gym.envs.box2d.bipedal_walker import BipedalWalker, BipedalWalkerHardcore from gym.envs.box2d.car_racing import CarRacing from gym.envs.box2d.lunar_lander import LunarLander, LunarLanderContinuous
8295c14d6e363c98ebd18668a90af5a78271d23d76050a3bc0d1693fd2ede4c4
Python
203
10
def normalize(tensor, mean, std): """ Args: tensor (Tensor): Tensor to normalize Returns: Tensor: Normalized tensor """ tensor.sub_(mean).div_(std) return tensor
b892b6afa534bcf76dec74b02c4380f4a911bb5e52a12588b2a13c0b5fd41a97
Python
203
2
from .dataset import PrecomputedCSVDataset, BLOSUMCSVDataset, PrecomputedCSVForCRFDataset, PrecomputedCSVForOverlapCRFDataset from .metrics import compute_metrics, add_dict_to_writer, compute_crf_metrics
381891cdd1d22f8fa1e72ebb6936b10db3db5d03a67993954e7399987c43f713
Python
206
10
import igraph import numpy as np from itertools import combinations import copy def calc_edge_importance(feat_mask, edge_indices): rows, cols = edge_indices return((feat_mask[rows]+feat_mask[cols])/2)
3bba15ee86a2f4654396db57313142fbb4e3ed5c765a7f69ba6697cd2bb1ac58
Python
206
8
from .auc_roc import * from .broadening import * from .cams import * from .graph_preprocessing import * from .ground_truth import * from .rse import * from .visualisation import * from .weight_init import *
660b0aa32de25b73ad76ad17ccec5708489d358c31b99ca56a72caccafa41e39
Python
206
4
from bioconfpred.data.split import RandomSplit from bioconfpred.model import ComENetModel data_split = RandomSplit() # default is the split number 0 model = ComENetModel.get_model_for_data_split(data_split)
66243bea80f418801b9d796d1405a13b215e465ef37abc1ad37b028549a34f74
Python
206
4
import os cmd2 = "cut -f1,2 -d ',' ../../../data/intermediate_data/t5_public_allele_level_tcr_filtered_wrt_vf_and_aa.csv > ../../../data/intermediate_data/public_allele_level_tcr_name.csv" os.system(cmd2)
818b1c9718f59b6e7e87c6fac6efeeeb932d6d9e93f9596712568515caff46ee
Python
206
7
from .bam import BAM from .fasta import FlatFASTA, GenomeFASTA from .table import Table from .vcf import VCF from .wig import BigWig __all__ = ["BAM", "FlatFASTA", "GenomeFASTA", "VCF", "Table", "BigWig"]
ce91f10684341e26cd6cea3f2ecb1233d99adb050b2f6c3028c1a0b03558e0f5
Python
206
11
def stars(p): if p < 0.0001: return "****" if p < 0.001: return "***" if p < 0.01: return "**" if p < 0.05: return "*" if p >= 0.05: return "n.s."
7442d49806cfca7fa6b658e43b941a2585c8544b69a9e939b5bae42b146a7598
Python
207
6
# default matplotlib colors cs_mpl = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'] # a nice blue/red color cblue = '#66ccff' cred = '#cc0000'
961edf11ea4e994af2ca635e8767138b2bd52512b1789a888e45c186a231192a
Python
207
6
"""Module defining models.""" from bioseq2seq.models.model_saver import build_model_saver, ModelSaver from bioseq2seq.models.model import NMTModel __all__ = ["build_model_saver", "ModelSaver", "NMTModel"]
fd230606a3719b831c6c608fee08e33724cc3de841d735289154891cae40c424
Python
207
8
# pylint: disable=wildcard-import """ SMOT: Single-Shot Multi Object Tracking https://arxiv.org/abs/2010.16031 """ from __future__ import absolute_import from .smot_tracker import * from .tracktors import *
a4933769a6f0eee75ca69cf840d794835fba9e59db925ad3fa13f925798bfa03
Python
208
9
"""Helper tasks for integration tests.""" from celery import shared_task @shared_task(name='celery.ping') def ping(): # type: () -> str """Simple task that just returns 'pong'.""" return 'pong'
a7e794bfc0246dc4ba59f83cdca21437e5c558f74fe75b61fb6734c18f46d029
Python
208
9
"""BdPy utility package. This package is a part of BdPy. """ from .utils import create_groupvector, divide_chunks, get_refdata, makedir_ifnot from .info import dump_info from .math import average_elemwise
24cd90fbd36285ad63d6e3c23ede6710dffaa4407849597fc044b6b1b4ca8fa8
Python
209
13
# -*- coding: utf-8 -*- from . import roles from . import directives def setup(app): roles.setup(app) directives.setup(app) from . import _version __version__ = _version.get_versions()['version']
55bf0484973d0108417487ab85859ead8c628b07047eb7431592ab70b208c5b1
Python
209
6
from matplotlib.colors import LinearSegmentedColormap colors = ["#FF807D", "#FFD37D", "#D9FF7D", "#7DFF82"] cm_rating = LinearSegmentedColormap.from_list("gor", colors, N=100) cm_rating.set_under("#DCDCDC")
65253da51ca8780fdfc6d3ef28103845cca8b9e83276bf4652afdb9b73e91ebd
Python
209
4
''' Module to extract morphometrics and TMD-input from a set of tree-shaped cells.''' from tns.extract_input.input_distributions import distributions from tns.extract_input.input_parameters import parameters
79a40cc23846c63f3f048478774e8c083a6d1ffb962ac728f649de44de62a117
Python
209
5
from .conf_pred_model import ConfPredModel from .atomistic_nn_model import AtomisticNNModel from .schnet_model import SchNetModel from .dimenet_model import DimeNetModel from .comenet_model import ComENetModel
e7e889dd1290f83211d603bbbb9896c5a37a152da4d2d2c7a6b7dc840a3d76c0
Python
209
4
from larvaworld.gui_v2.tabs.home import build_home_text from larvaworld.gui_v2.tabs.placeholder import build_entry_text, build_group_text __all__ = ["build_entry_text", "build_group_text", "build_home_text"]
537f6f3dd6869850151018c888f45fcff796c3c1b91b7fb3b93e9633b6be65e7
Python
210
7
import torch DTYPE = torch.get_default_dtype() DTYPE_INT = torch.int64 DTYPE_BOOL = torch.bool TORCH_FLOATS = (torch.float16, torch.float32, torch.float64) TORCH_INTS = (torch.int16, torch.int32, torch.int64)
81cb15f6b6044e98b230b25d3dcba33becdef761c45ac9d5fb8edf33b55ab53c
Python
210
9
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.run_binarizer(0.178e-2)
8c9b5d539f5d16b9d2c7ca7b9e99aeae5863bb92850d00d2c991dd597ff1c261
Python
210
12
__author__ = 'quentin' from ethoscope.hardware_control.arduino_api import SleepDepriverInterface sdi = SleepDepriverInterface() sdi.deprive(0) #sdi.deprive(0) # for i in range(12,32): # sdi.deprive(i)
d840e2790edd8eafc63f2414d314b73143a4740d47896dced2dd4e9871c2164b
Python
210
11
from neuron import h def test_internal_function(): s = h.Section() s.nseg = 4 s.insert("internal_function") assert s.internal_function.g() == 42.0 assert s.internal_function.f() == 42.0
ffb360800e5dca5537830f7bc8eaf75b7a32fe184a577da86ec64d8857cc86c1
Python
211
4
from gym.envs.toy_text.blackjack import BlackjackEnv from gym.envs.toy_text.cliffwalking import CliffWalkingEnv from gym.envs.toy_text.frozen_lake import FrozenLakeEnv from gym.envs.toy_text.taxi import TaxiEnv
7e7a4e5f61c4121a8f5fad40bd5312675989f40e6984cbc514b6b9645a3bdc95
Python
212
7
# -*- coding: utf-8 -*- # @Author : Yue Liu # @Email : yueliu19990731@163.com # @Time : 2022/9/21 0:43 from .clustering import k_means from .evaluation import evaluation __all__ = ['k_means', 'evaluation']
05c59f23f80e1bb65cb4a29992d53227699162eae19b3f0ffbdd3e3d6e4739a0
Python
213
3
from utilities.files import list_files, splitall from utilities.im import imRescale2uint8, imLevels, customResize, imShowMe, imBackground from utilities.vec import norm, norml, Norml, SSprod, vprod, Vprod, VVprod
a75cedb65c940e5dea32e98be355f5b7d7eaaceeaa63543dcf5faa5b9f54c03d
Python
213
7
"""Spectral parameterization.""" from .version import __version__ from .bands import Bands from .models import (SpectralModel, SpectralGroupModel, SpectralTimeModel, SpectralTimeEventModel)
ac8cea1f29af08f39377e3045d97c66577c53ef3884a39a9f50dfacdf8d6ec52
Python
213
11
import time class MockSerial: def write(self, str): t = time.time() print(f"{t} : MockSerial > {str}") def close(self): t = time.time() print(f"{t} : MockSerial closed")
af5c2a0d1a5c5ec7b980aaa38ee226b7503c54e2335ee807960f7a17fa3823ac
Python
213
15
ORBITALS = ["s", "p", "d", "f", "g"] NUM_ORBITALS = { "s": 1, "p": 3, "d": 5, "f": 7, "g": 9, } IRREPS_ORBITALS = { "s": "0e", "p": "1o", "d": "2e", "f": "3o", "g": "4e", }
fb490796ff94ed8b8ff84842089098c1c32f12f05693a756497e430de231f324
Python
213
4
from pl_bolts.models.detection.retinanet.backbones import create_retinanet_backbone from pl_bolts.models.detection.retinanet.retinanet_module import RetinaNet __all__ = ["create_retinanet_backbone", "RetinaNet"]
0d68289dcda82db1df2a1fa94c62388509cda52dcd8c0ef852701ee02dbb148b
Python
214
6
# pylint: disable=wildcard-import """Video action recognition, something-something-v2 dataset. https://20bn.com/datasets/something-something """ from __future__ import absolute_import from .classification import *
362bca1d0502eca70a2d051eea4ad27b5ea8ec94132df156d61ff4326e6aaa23
Python
215
6
from importlib.metadata import PackageNotFoundError, version try: __version__ = version("flash_attn_3") except PackageNotFoundError: # not installed (e.g. running from a source tree) __version__ = "3.0.1"
6d4108be8da65a90262325a29906656e1ad117ce40736542632236569aa178f5
Python
215
7
def pytest_configure(config): try: import sqlalchemy.exc # noqa: F401 except ImportError: pass else: config.addinivalue_line("filterwarnings", "error::sqlalchemy.exc.SAWarning")
d160b5faf7d8f6f5bff645cf0b86098e2caf241f3c99ae7c7434448867bca019
Python
215
5
__all__ = ['extraction'] from .extraction import extract, _generate_box_indices, _slice_array from .file import to_file, from_file, from_file_info, load_ds_list, manually_added_neurons_n from .signal import Signal
03cfbc0e93f8ad31d7736c97b27540e158a49edeebd26fea23aa702f5db5f6f2
Python
216
5
from .model import resume_checkpoint from .utils import resolve_data_config, update_cfg from .optimizer import optimizer_kwargs, create_optimizer_v2a from .scheduler import create_scheduler from .metrics import rmse
aff1ac8ea5b7c6e4d7adf67a0eae5c13cbb9adf38e1a2434e6cc7e6824c56b11
Python
216
15
import pytest from js_example import app @pytest.fixture(name="app") def fixture_app(): app.testing = True yield app app.testing = False @pytest.fixture def client(app): return app.test_client()
f2b2e2475dd61d258bb045534cbea5cce666b342d97fe66e8c1a8e2395672b19
Python
216
4
"""Visualization module.""" from sknetwork.visualization.dendrograms import visualize_dendrogram, svg_dendrogram from sknetwork.visualization.graphs import visualize_graph, visualize_bigraph, svg_graph, svg_bigraph
02b7fd2c2ed0e92380363a401d182db90294283a18df6376f249cefa8aed9950
Python
217
7
# pylint: disable=wildcard-import """Mask RCNN Instance Segmentation""" from __future__ import absolute_import from .mask_rcnn import * from .predefined_models import * from .data_parallel import ForwardBackwardTask
32b96319785b8cd082366b7af1aac9819ebda3ccc0334b87219f553f0da3a545
Python
217
7
"""R-like structures for Python. This sub-package provides pure-Python implementation of data structures that, while conceptually across Python and R, have subtle differences in behavior that can lead to issues. """
509c61da69e385c7db056ace79c882ad5aa07c85f602c0595b9d7685a90f7c22
Python
217
7
from pl_bolts.models.regression.linear_regression import LinearRegression from pl_bolts.models.regression.logistic_regression import LogisticRegression __all__ = [ "LinearRegression", "LogisticRegression", ]
51b283eb5090075419d97fe016904ffc834d8ea86d0f5f5c0c913f9365141ade
Python
217
4
"""Task utils""" from .classification import train_classification, validation_classification, test_classification from .coot import train_coot, validate_coot from .pose import DirectposePipeline, build_pose_optimizer
54cf07961d7fc8a025941e395d2e3a9221859d351a552922fc81a9755e0ab722
Python
217
8
"""Functionality related to definining fit modes.""" from .mode import Mode from .paramdef import ParamDefinition # Link in report function to list available modes from specparam.reports.options import check_modes
a83c5c00f2558bc836ef6a257fdd5a47ed75ea93dcd9ee619861bb4f21b3befe
Python
218
4
from ._attribute import attribute_sdata from ._filters import generate_pfms_sdata, filters_to_meme_sdata from ._generative import evolve_seqs_sdata from ._gia import positional_gia_sdata, motif_distance_dependence_gia
bfd0bc3d56d34313101743459cf340f4d47c347ed9fe9cb86c4675b3e243aa5b
Python
218
10
import pytest import rpy2.rlike.indexing as rfi def test_order(): seq = (2, 1, 5, 3, 4) expected = (1, 2, 3, 4, 5) res = rfi.order(seq) for va, vb in zip(expected, res): assert seq[vb] == va
f82de094f0e40e7ec277364081a12b073df2a14a4b0d19eb2f0f018b4327862f
Python
218
4
from .agent import AgentConfig, AgentInferenceConfig, AgentTrainingConfig from .env import EnvConfig from .monitor import MonitorConfig, MonitorPlotConfig from .plot import PlotConfig, PlotFontConfig, PlotLegendConfig
a46fbe033ce0bedb06d47eea5b516a625b1ee0d1b08e9fbae8ce9f6b593aa462
Python
219
10
from django import template register = template.Library() @register.inclusion_tag("youtube_thumb.html") def youtube_thumb(video_id, width=640): return { "video_id": video_id, "width": width, }
05c797a5254038ef256432c1805d53b004399e0dd597429174a5343559d2fbd0
Python
220
10
import torch from lightly.transforms import RFFT2DTransform def test() -> None: transform = RFFT2DTransform() image = torch.rand(3, 32, 32) output = transform(image) assert output.shape == (3, 32, 17)
1d7ffaac540e7f8b3277e86546cd2521c8db630005925cce5998a9ebbae02dfa
Python
220
6
from . import _version from .domain_of_validity import DoV from .parameters import Parameters from .polyid import MultiModel, SingleModel, generate_hash, RenameUnpickler __version__ = _version.get_versions()["version"]
52411ddec8f94c454b8a362a31ce3d898373af7d16f24ad5d1ab52d5e8b18572
Python
220
10
from PIL import Image from lightly.transforms.jigsaw import Jigsaw class TestJigsaw: def test_on_pil_image(self) -> None: crop = Jigsaw() sample = Image.new("RGB", (255, 255)) crop(sample)
c806695e434bc723c466ddf03edffe14f8131b607b667333d95351c6c205db39
Python
220
10
""" Larvaworld Portal (M1) This package provides a registry-driven landing shell for Panel apps. Core modules must remain UI-agnostic (no Panel imports). """ from __future__ import annotations __all__: list[str] = []
19a22163929f70a885e7da9501751ab5b6431b3540b7ea9dbdc818991b4b4342
Python
221
14
from neuron import h, gui def test_globals(): s = h.Section() s.insert("globals") h.gbl_globals = 654.0 assert s(0.5).globals.get_gbl() == h.gbl_globals if __name__ == "__main__": test_globals()
6b68add3626922ad0d592d63b48de0cfa5cf224735607ef6fe52bc163ef5ec6d
Python
221
13
from neuron import h, gui def test_locals(): s = h.Section() s.insert("locals") assert s(0.5).locals.get_a() == 32.0 assert s(0.5).locals.get_b() == 132.0 if __name__ == "__main__": test_locals()
390edd5b096770822c3e8e6442ed9a914864fe6ef7bd0b85d7b2da1f4b22aa8e
Python
222
5
"""Path module""" from sknetwork.path.dag import get_dag from sknetwork.path.distances import get_distances from sknetwork.path.search import breadth_first_search from sknetwork.path.shortest_path import get_shortest_path
560f2de6d551d7d17971de8ba5966258b7c8cafcee5b267d39521e59b9656281
Python
222
6
from setuptools import setup # For compatibility with legacy builds or versions of tools # that don’t support certain packaging standards (e.g. PEP 517 # or PEP 660). The configuration is kept in pyproject.toml setup()
32c53f315dfb2cab005ab93ee62fd5a634c774e80ab66bfe2dd30193d60b72c2
Python
223
6
# pylint: disable=missing-module-docstring from .resnet_encoder import ResnetEncoder from .depth_decoder import DepthDecoder from .pose_decoder import PoseDecoder from .monodepth2 import * from .monodepth2_posenet import *
48b06dbd07115261fc0209bb6eb07bc6e7cadf5011bd6f4dfbcf1fc8bfc4269b
Python
223
6
from dextr import DEXTR from config import Config model = DEXTR(nb_classes=1, resnet_layers=101, input_shape=(512, 512), weights_path=Config.DEXTR_FILE, num_input_channels=4, classifier='psp', sigmoid=True)
6597b12ba93cb8b0a5a8a3f00a93f63cb77a1165447c9507c3c26391c5fe487d
Python
223
17
global fasta_path def _init(): global fasta_path fasta_path = '/base' def set_fasta_path(value): global fasta_path fasta_path = value def get_fasta_path(): global fasta_path return fasta_path
80288812cfd6132f0e45ae414adaab2309aec77628b616d0713a760ffaf27d1c
Python
223
9
from .differential_geometry import ( morphofield_acceleration, morphofield_curl, morphofield_curvature, morphofield_divergence, morphofield_jacobian, morphofield_torsion, morphofield_velocity, )
85e693d6ce70923a32a164bb4cbba99a747bc2db712ff24003dbeb20b38b00cb
Python
223
4
from pl_bolts.models.detection.faster_rcnn.backbones import create_fasterrcnn_backbone from pl_bolts.models.detection.faster_rcnn.faster_rcnn_module import FasterRCNN __all__ = ["create_fasterrcnn_backbone", "FasterRCNN"]
307ce679cc80324a5a9aeacc2a1bf4c0d9a6a85276b6f571dfaa7c77f9e865cd
Python
224
7
from .embedding.pca import run_pca from .embedding.umap import run_umap from .embedding.ica import run_ica # from .embedding.scvi import run_ldvae from .embedding.fa import run_fa from .embedding.diffmap import run_diffmap
7a3009c5a32cb7a61259d69488eba6508843ac1c7732f33636b4e243dec3c855
Python
226
4
from .lstm_cnn import SequenceTaggingLSTMCNN, SequenceTaggingCNN, SequenceTaggingLSTM, SequenceTaggingLSTMCNNCRF from .linear import SequenceTaggingLinear from .crf_models import LSTMCNNCRF, SimpleLSTMCNNCRF, SelfAttentionCRF
9f76f1c948535afdf0ade63651eb368a994236f0bab4d87d41d381b3a735a468
Python
226
6
from tfep.io.log import TFEPLogger, TMBARLogger from tfep.io.dataset import ( DictDataset, MergedDataset, TrajectoryDataset, TrajectorySubset, get_subsampled_indices, ) from tfep.io.sampler import StatefulBatchSampler
c70d4df1b7f46608493c4827b0159bb2bd2a932a0848b959330264d06adc0804
Python
226
6
import sys import pytest if_pypy = pytest.mark.skipif(getattr(sys, 'pypy_version_info', None), reason='PyPy not supported.') if_win32 = pytest.mark.skipif(sys.platform.startswith('win32'), reason='Does not work on Windows')
772e98ce14bc4ef882c9337f1e8abb79b7a7fee21ebdbb1cf575ea5a95a1afe0
Python
227
10
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.n_epochs = 1 msp.run_binarizer(0.178e-2)
f7040826fe7a33631d33c4d13686e4c4d7836dec85938f3c7eadcb334fdcdc1b
Python
227
10
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.n_epochs = 1 msp.run_binarizer(0.752e-2)
0b3b539149a54c52bde5851ae1bb2deda7d53881941024d83ada30a3c185106a
Python
228
11
#!/usr/bin/env python3 """Download test data.""" import sys from xcp_d.tests.utils import download_test_data if __name__ == '__main__': data_dir = sys.argv[1] dset = sys.argv[2] download_test_data(dset, data_dir)
1e70c2fe58e49947b422eaf27ffed699d7871d32d6702c14484f2126c9eeaf1d
Python
228
10
"""Tools for converting derivatives from various pipelines to an fMRIPrep-like format.""" from xcp_d.ingression import abcdbids, hcpya, ukbiobank, utils __all__ = [ 'abcdbids', 'hcpya', 'ukbiobank', 'utils', ]
2d0644078103fc62f56abd85fe8d2255368cd0307fce6053fb99112d1f0e96de
Python
228
4
from __future__ import absolute_import from . import * from ovseg.networks.UNet import UNet from ovseg.networks.resUNet import UNetResEncoder, UNetResEncoderV2, UNetResDecoder, UResNet, UNetResStemEncoder, UNetResShuffleEncoder
ad641469504ed3f09c067073ef8a3f7d59717826827d1d537d02991b7eb148db
Python
228
8
"""Presets of sophisticated data transforms used in various papers.""" from . import ssd from . import rcnn from . import yolo from . import center_net from . import imagenet from . import simple_pose from . import segmentation
cd658fb790c4371210c2d22eb1216796aefa6822bca29c8df32fbf034c1ec089
Python
228
3
from .backbone import backbone_scc, construct_backbone, update_backbone from .backbone_methods import ElPiGraph_method, PrinCurve_method, SimplePPT_method from .backbone_utils import map_gene_to_backbone, map_points_to_backbone
01d964ff32ac508665616b86171bc2d820adec90f6e366f0e9db6aa7afcb5dad
Python
229
4
from .CAST_Stack import CAST_STACK_rough, corr_dist, reg_params, region_detect from .main import CAST_MARK, CAST_PROJECT, CAST_STACK from .utils import * from .visualize import dsplot, kmeans_plot_multiple, plot_mid, plot_mid_v2
0581364bced926048d43016a1e726a0a9262d966d7571f44ee08e0156d0412b5
Python
229
13
from sys import argv from msp import MSP, setup_as_am msp = MSP() msp.file = __file__ msp.seed = int(argv[1]) setup_as_am(msp) msp.acc_thresh = 0 msp.extra_params += " --learned-motif-sparsity-threshold-initial 85" msp.run()