sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
d847420edded2597987ecc467395eaa5d0b4fd27a6d08d63cfa1ce61ca3acffe
Python
160
6
from snakemake.shell import shell shell( "samtools view -T {snakemake.input.ref} -@ {snakemake.threads} -C -o {snakemake.output} {snakemake.input.bam}" )
2505df0f963aa2143318e4ad7238c7540ddde2782a802a3d32281d26baf00acb
Python
161
7
import os VERSION = "3.4.7" if os.path.exists(os.path.join(os.path.dirname(__file__), '_version.py')): from ._version import version VERSION = version
57cdae9b1e1d864e066269106a140dd8510e27017fae0b7eafa91e0a8c2bd2c9
Python
161
7
lines = open("total_times.txt", "r").readlines() total_time = 0.0 for line in lines: time = line.split()[1] total_time += float(time) print(total_time)
34ff44dba7221efba3cc7ed365365d7e2a2bd4d9e39605941ec991c2b10a906d
Python
162
6
from __future__ import absolute_import from __future__ import division from __future__ import print_function from pylib.timer import * from pylib.utils import *
2c2c369113891e1a58cd94091fccbbd095686e1e91de07bf66e5d31f8952767a
Python
163
6
#!/usr/bin/env python3 # encoding: utf-8 # @Time : 2018/8/20 下午12:53 # @Author : yuchangqian # @Contact : changqian_yu@163.com # @File : __init__.py.py
50d06a39f65741e1d006caf9e10d0579239611074de19d374334e62de8367783
Python
164
7
import unittest loader = unittest.TestLoader() suite = loader.discover(start_dir='../', pattern='*_test.py') runner = unittest.TextTestRunner() runner.run(suite)
a26d250cbe9c05861faae1be214dc2e4e99f1b4f75f3ab9245f27956229252fc
Python
164
4
from .gaussian_target import gaussian_radius, gen_gaussian_target from .res_layer import ResLayer __all__ = ['ResLayer', 'gaussian_radius', 'gen_gaussian_target']
a4595bcb162e868e6bd271ee5992e90e7e97830dc50debfa1bd3e4cfce1dfa38
Python
166
4
from .compartment import Compartment, Dendrite, Soma from .ephysproperties import EphysProperties from .equations import library from .neuronmodel import NeuronModel
3c9b2a78dc58000f68f8fc664d0947149ea2c511180d17bbc67e84db2b909578
Python
167
6
from .cascade_analysis import * from .celltype import * from .process_graph import * from .process_matrix import * from .traverse import * from .generate_adjs import *
feccca13ca73ed92154bf8b03c9c23b16c2b21f57b35e4f21b92029b03be0c7f
Python
167
6
from . import models from . import training from . import viz from .Dataset import Dataset, calc_dfc, get_network_input_obs from .models import Params, GeneratedData
4a618b2de20945f57278aae1447d520c4fd1439ede424c21121093f78e636754
Python
168
9
# -*- coding: utf-8 -*- """ Created on Mon Oct 28 14:57:35 2019 @author: RJovelin """ # setup and code access debarcer version from this module __version__ = "2.1.4"
4ca99856c4019050a75aabae25559cf854afc88919b8e451c817a7ddce1f07cc
Python
168
7
from .dataProcessingUtils import * from .featurize import * from .resnet import * from .model import * from .model2 import * from .utils import * from .dataset import *
ae408f62b8f4f9ae7d0ee3003fff588fa84a5c4773436f0a261cd200873ed834
Python
168
8
"""Defines the list of words that should be removed from query""" class QueryStopwords: words = [ "neuron", "cell", # add others here ]
f6b5848f3bdbfc1a74f0b6746bc165692c9316f82fd7d60e6079a0f4225c8f24
Python
168
8
ENTITY_KEY = 'Entity' VISCOSITY_KEY = 'Viscosity_at_150' SCHRODINGER_BASE = '/localscratch/software/schrodinger/adv-2021-2' def get_file_path(): return __file__
259bcdad08b0b6b8675a0fa741e9520b198b7e7ba944b1cd16d5aca4da8a8c26
Python
173
8
import tensorflow as tf import numpy as np import os def seed_everything(seed): np.random.seed(seed) os.environ['PYTHONHASHSEED'] = str(seed) tf.random.set_seed(seed)
579205dc9cac2ed9f73efbfff434266dbd1bdf3c1ae6bf19ceaa75740e9ee4c5
Python
173
4
from slideflow.tfrecord.torch import dataset from slideflow.tfrecord.torch.dataset import TFRecordDataset from slideflow.tfrecord.torch.dataset import MultiTFRecordDataset
66a95b3bd2cd222e3283a79745d12b3d0de55caf62cd8eac2bd614eb086d7aa4
Python
174
7
from .augmentation_functions import AllRandomAugmentations # USAGE: import augmentation function and add to this list augmentation_list = [ AllRandomAugmentations ]
b1870cfd1aef1d7d6ded2fa28bf714007426f306ae3c5694875d8721da22aa4d
Python
175
5
class Relationship: def __init__(self, subject, relationship, object): self.Subject = subject self.Relationship = relationship self.Object = object
b85f931b159372ab199c84bd2e3bb34a60c594367872a93680b4850c88e8808e
Python
176
4
from M2TR.datasets.CelebDF import CelebDF from M2TR.datasets.dataset import DeepFakeDataset from M2TR.datasets.FFDF import FFDF from M2TR.datasets.ForgeryNet import ForgeryNet
abef4cad394520edab9bf59eb0b71375b95928c6c7c8fe35cd4ea5d98efbfecd
Python
178
10
#!/usr/bin/env python import sys from openmmlib import pymol_show from openmmlib.polymerutils import load inFile = sys.argv[1] data = load(inFile) pymol_show.show_chain(data)
10d5c27b3df983bdaf217d8ab12796e10805559d6dec10ef3a2b31f69107fb05
Python
179
4
from .decorators import auto_fp16, force_fp32 from .hooks import Fp16OptimizerHook, wrap_fp16_model __all__ = ['auto_fp16', 'force_fp32', 'Fp16OptimizerHook', 'wrap_fp16_model']
7b6a0637c9dd685f6605ac3600b7154140e6aa024398fd342e8c71b71e739776
Python
179
8
#!/usr/bin/env python3 # encoding: utf-8 # @Time : 2018/8/3 下午2:59 # @Author : yuchangqian # @Contact : changqian_yu@163.com # @File : version.py __version__ = '0.1.1'
e9c6199a4cbaa9ff39141a4a1ab272710c1dadeed682d850c7e8deb22d512232
Python
179
4
from .gcn import GCN_2layer, GCN_3layer from .gin import GIN_2layer, GIN_3layer from .utils import load_data, train, test from .models import SAGE_3layer, GAT_3layer, JKNet_3layer
00fcaef541b43ac8f88b40e60784e1d445b83e214f72090a78fe7349c61794dc
Python
180
7
from importlib import metadata try: __version__ = metadata.version(__package__) except metadata.PackageNotFoundError: # package is not installed __version__ = "0.0.0"
ca7ba25a1b76737fd936584323dba51a57b28f654699590fc488acd99f674418
Python
180
4
custom_params = {} custom_params['model_dir'] = 'nn_models/pb_only/model_data/' custom_params['out_dir'] = 'output/pb_only/' custom_params['feat_mask'] = [0.0, 0.0, 0.0, 1.0, 0.0]
fb018d69eb0b78e8fd8821bdda201dd4e98280ef26a11c9ea6b60563f75927e6
Python
180
14
import os import sys os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" import cenfind def main(): return cenfind.run(sys.argv[1:]) if __name__ == "__main__": sys.exit(main())
11f7ae7b261b7592452d9dd2c7d8b159a6131ab655d851f5d45c56225a88db2e
Python
181
8
from . import annotation from . import constants from . import correction from . import image from . import main from . import model from . import multipage from . import selection
7c714385319fa6dd81f1a4a9ad88627b6ebe411078c26053c3c24ad5ddc7be33
Python
181
6
""" This package contains classes that are necessary to encode data for modeling molecules as they are (i.e. without fragmenting). Created by: Martin Sicho On: 26.04.22, 13:12 """
fd2ef1015be9f6fc652955b3116c2d719ba44c75065784c65f63b7be35ee7aaf
Python
181
10
#!python import sys for l in sys.stdin: sys.stdout.write(l) if l=="#include <Python.h>\n": sys.stdout.write("#undef c_abs\n") #sys.stdout.write("#undef _c_Py_abs\n")
3a49495a6a6c9377dd6d139d9056023f1149b6258022c20178e4a242265c8bc4
Python
182
13
from enum import Enum class Camera(Enum): LEFT = "left" RIGHT = "right" FRONT_WIDE = "front_wide" class TurnSignal(Enum): LEFT = 2 STRAIGHT = 1 RIGHT = 0
98169a7a6d4b2897e35e8a9df63a515beac6a2093fb78991a6f30aa40a19f91c
Python
182
3
from .affine_registration import affine_registration from .rigid_registration import rigid_registration from .deformable_registration import gaussian_kernel, deformable_registration
4ed10be99e2bc72534c724641eb321c9c7c1a5c53749eb4a7bb544edb13002cc
Python
183
8
# Load subpackages in current namespace from . import data from . import finetuning from . import loss from . import metric from . import model from . import test from . import train
ee3002f32e1be7acca2f9116a7f7755161bbe9d7ea9af2f2dfe956aa34f55cb9
Python
183
6
import ast import numpy as np def string2array(array_string): array_string = ','.join(array_string.replace('[ ', '[').split()) return np.array(ast.literal_eval(array_string))
bf0da6ced527ce897d23dff421c50177ccebbecfe69254a626bb85282b5e93a7
Python
184
5
""" Refer to https://github.com/rosinality/stylegan2-pytorch/blob/master/op/__init__.py """ from .fused_act import FusedLeakyReLU, fused_leaky_relu from .upfirdn2d import upfirdn2d
5eed5612187e62b47ec62e16f768bc1e2e002d9f84d9a050504fae6bed83d4c5
Python
185
12
from abc import ABC, abstractmethod class ConversionException(Exception): pass class MolConverter(ABC): @abstractmethod def __call__(self, representation): pass
0adceb5cd3f69a49ff5333c43adb16ef0fa717531bba9e63e1a4eb3710aeca0e
Python
186
4
custom_params = {} custom_params['model_dir'] = 'nn_models/hbond_only/model_data/' custom_params['out_dir'] = 'output/hbond_only/' custom_params['feat_mask'] = [0.0, 0.0, 1.0, 0.0, 0.0]
1540f5fff2191c3350f56c2b0c3eed1f3477e5cc9c1f7837e83c298892ce4211
Python
186
6
from .ObjectCreator import ObjectCreator from .MaterialHandler import MaterialHandler from .NoiseModel import NoiseModel from .Projector import Projector from . import utils, transform
a90553c4eba7b399987a0617ad7662e12b0212006e20e09ffe34a8ba1f2e38ba
Python
186
8
''' Plotting tools. TODO: - plotting many curves with the right colors - arrows showing the PIV vector, maybe within a Paramecium shape ''' from .plots import * from .draw_cell import *
be68df4298c0bf7608b7aff73fcee0d6339cc5b9e95a446ba217342eef40392b
Python
186
4
custom_params = {} custom_params['model_dir'] = 'nn_models/shape_only/model_data/' custom_params['out_dir'] = 'output/shape_only/' custom_params['feat_mask'] = [1.0, 1.0, 0.0, 0.0, 0.0]
fcea940143457817e5aae59ab4b52f146ea69cafa84288b9f1fcc3a7666495c5
Python
186
4
from PyInstaller.utils.hooks import collect_data_files, collect_submodules datas = collect_data_files("skimage.io._plugins") hiddenimports = collect_submodules('skimage.io._plugins')
2cfdfbbd86c745a44cb69763ae0a8d720be81c51442b616c6d1db8961391dad0
Python
187
8
from setuptools import setup setup(name='BATMAN', version='1.0', description='BATMAN Python package', author='Riverside Research', packages=['batman'], )
b831722730fce70196680bf23fb74df2e428188c8ef49d4f09714c9d0f6db5a4
Python
187
4
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from .build import make_optimizer from .build import make_lr_scheduler from .lr_scheduler import WarmupMultiStepLR
7f35a8a3fc5befebfed77b0dd1eae21ea5752f2e3104d32b1b101369aa2ff714
Python
189
4
import os # please refer to the readme on where to get the parameters. Save them in this folder: folder_with_parameter_files = os.path.join(os.path.expanduser('~'), 'hd_gliomouse_params')
b3110eeaacd81c81b3a9e7e650dfdfcdf71011d9b0bca1f7e10d37b52be62572
Python
190
12
import networkx as nx import matplotlib.pyplot as plt BAG = nx.barabasi_albert_graph(n=10, m=1) pos = nx.kamada_kawai_layout(BAG) print(type(pos)) print(pos) nx.draw(BAG, pos) plt.show()
716ba811d49219b99969d52fd7e2f577080a155ca87d26c98d12a10190dd43e7
Python
194
7
from svglib.svglib import svg2rlg from reportlab.graphics import renderPDF def svg_to_pdf(svg_file, pdf_file): drawing = svg2rlg(svg_file) renderPDF.drawToFile(drawing, str(pdf_file))
52cd74e0a6c2b6cca55fb3326da7cea614e6b9745ef969c3ccd7716a7804f583
Python
196
11
from typing import Mapping CURIE = str LABEL = str URI = str PRED_CURIE = CURIE SUBSET_CURIE = CURIE CATEGORY_CURIE = CURIE TAXON_CURIE = CURIE LANGUAGE_TAG = str COUNT_MAP = Mapping[CURIE, int]
a53ec3721ff09591a9d7c8867ba54ffbfc88bb1f9450c895d24bc3916122b1a3
Python
196
10
__all__ = ['__version__'] # major, minor, patch version_info = 1, 3, 0 # suffix suffix = None # version string __version__ = '.'.join(map(str, version_info)) + (f'.{suffix}' if suffix else '')
69a15f34e7e2b05b3f9f75dc4d3806cb6ff961a3379513ae30a099994a0b3409
Python
199
4
from .dynamics import * from .various.math_phase import rms, get_phase_random, order_parameter, get_mean_phase from .various.my_logging import setup_logging from .various import parallel_with_threads
bfbe93b8b0e8de1824784af38882b7a94020173aefb5c7422b71d96591b27847
Python
199
5
from .config import get_parser as translation_parser from .model import TranslationModel from .trainer import TranslationTrainer __all__ = ['trans_parser', 'TranslationModel', 'TranslationTrainer']
9decf25a9a2030ba99388477b809b05dcbaa35d9851777feadfb81e36b2f58c6
Python
200
9
import numpy as np def onehot(data, n): """onehot ecoder""" buf = np.zeros(data.shape + (n,)) nmsk = np.arange(data.size) * n + data.ravel() buf.ravel()[nmsk - 1] = 1 return buf
45f51b45c266ecac85f78f65306d473d1ff72eb3e5fffc6860b1059379f84d37
Python
201
5
from utils.dataloaders.dataloader import * from utils.dataloaders.folders import * from utils.dataloaders.csv import * from utils.dataloaders.pickle import * from utils.dataloaders.statements import *
3537d33b35cbedeaa12a7803b7ed6ac190bdafb4e8a5bbfe0e941e6dddb73f9a
Python
202
11
import logging import sys logger = None if not logger: logger = logging.getLogger('drugex') logger.setLevel(logging.INFO) def setLogger(log): setattr(sys.modules[__name__], 'drugex', log)
90c878dc7f017b06719dd99b3cacbdeb6fc8fd69e0e0cbd520efe96989a0bc08
Python
204
8
# Load subpackages in current namespace from . import ccreg from . import fluorescence from . import image from . import metrics from . import multithreading from . import processing from . import script
80acde023cbc957ad2e17a011a5e920cb685af1a3c62a748fd6e10e64e70ef68
Python
205
9
#!/usr/bin/env python3 # encoding: utf-8 # @Time : 2018/10/3 下午2:10 # @Author : yuchangqian # @Contact : changqian_yu@163.com # @File : __init__.py from .syncbn import * from .parallel import *
b01e8ad0e128433e90dddb443f14e8180c4c4d5da474cee5c3576230f0bb36f5
Python
205
7
lines = open("total_times.txt", "r").readlines() total = 0.0 for line in lines: val = float(line.split(" ")[1]) total += val print(val) print('Total time (cpu minutes): {}'.format(total / 60))
b1cbd5a7d983b70254b8ec4010a41dd00777d1b084a371bae847ffd8ed8539c2
Python
205
7
lines = open("total_times.txt", "r").readlines() total = 0.0 for line in lines: val = float(line.split(" ")[1]) total += val print(val) print('Total time (cpu seconds): {}'.format(total / 60))
75b5756dae270b56b1ae77fb1ca892ed53893fa067cd16cb37e03cc36c85d3d9
Python
206
7
from setuptools import setup setup(name='graphxai', version='0.1', description='algorithms and metrics for explaining graph neural networks', packages=['graphxai'], zip_safe=False)
dc9bc7c2ae88d0a27b241b93dde8b1fcccabc5026a726d488e356c79728fa80d
Python
208
14
class NoSiteMeterException(Exception): pass class LabelNormalizationError(Exception): pass class NotSupportingMultiprocessing(Exception): pass class InvalidIteratorArgs(Exception): pass
883210407eade51145627f553b21fff58ab14654b89a04bda1426184af1641b1
Python
210
7
from torch.utils.data import DataLoader from prefetch_generator import BackgroundGenerator class DataLoaderPrefetch(DataLoader): def __iter__(self): return BackgroundGenerator(super().__iter__())
9d820ad0d8d14d499fd928431a97afab818b6eda7e615e356b81a9397734402f
Python
210
7
from .dist_utils import DistOptimizerHook, allreduce_grads from .misc import multi_apply, tensor2imgs, unmap __all__ = [ 'allreduce_grads', 'DistOptimizerHook', 'tensor2imgs', 'multi_apply', 'unmap' ]
f2056497f464e0c897369933c5a76dbdbad47723ebe1f255c33bb01fba28ba3d
Python
213
12
class KeywordCollection(list): def GetKeywordAndSubregionUris(self): result = [] for keyword in self: result.extend(keyword.GetKeywordAndSubregionUris()) return result
08b41636252fd9193ed657c3fe34fc1f4565f9ff60b50fa012af0a744bf2e7b7
Python
215
6
from graphxai.datasets import load_ShapeGGen Owen_root = '/Users/owenqueen/Desktop/HMS_research/graphxai_project/GraphXAI/data/ShapeGGen/unzipped' SG = load_ShapeGGen(name = 'SG_HF_HF=1.pickle', root = Owen_root)
5188c9628fff5731ede8e4692d64fb8e05ab91238353cc167648601538242e7b
Python
215
6
from .unet import UNet_A,UNet_B # from .atrous_unet import AtrousUNet # from .rdn import RDN # from .split_atrous_unet import SplitAtrousUNet, MinimumUNet, MergeHead # from .lapsrn import LapSRN from .util import *
47040f762acb942f82a2793184d079f6fd3392413b0b3ae4626d580134be3fa2
Python
216
6
"""carla-agentic-tools: a standalone MCP server exposing the CARLA skill registry.""" # Keep in step with the plugin manifests; tests/test_version.py fails on drift. __version__ = "0.6.0" __all__ = ["__version__"]
692619c4a4f42a0e6dfcf3454e801f7961fd3be18ac40e1ce84259e37caa0f52
Python
216
10
def load_params() -> dict: """Returns the params dictionary""" return params params = { "custom_objects" : None, "learning_rate" : None, "temp_dir" : None, 'best_model_scores' : [] }
6f604c20db899fbd961716cc39846f2a01fa3fed6b23a109224d9194991473af
Python
216
7
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from ._utils import _C # from maskrcnn_benchmark import _C nms = _C.nms # nms.__doc__ = """ # This function performs Non-maximum suppresion"""
fb26235176c3f83c23662f78d18512ccf4591cb8ddedc4b30f94b5afe21050d5
Python
216
9
#coding:utf-8 import torch from torchsummary import summary def valsum(model, input_size, device = -1): summary(model, tuple(input_size)) # https://github.com/sksq96/pytorch-summary # pip3 install torchsummary
18c95a23949e6a1c1f1cecdbfd19ec86d2afe249babfc5a19fbfa6f3e2378265
Python
217
12
from .io import ( read_json, write_json, dcm_info, parse_dcm2niix_fname, parse_bids_fname_keyvals, safe_copy, safe_mkdir, create_file_if_missing, strip_extensions, nii_to_json )
3dc90158bfa692e7b9778d6e79de939454f3300827471b7ec7eefb01e5b126f4
Python
217
7
import torch import torch.nn as nn def weighted_CrossEntropyLoss(output, target, classes_weights, device): cr = nn.CrossEntropyLoss(weight=torch.tensor(classes_weights).to(device)) return cr(output, target)
a1f7fba9874f9dd0e594e09b83a98b4b5580df5301e144295b12da4c4bf76594
Python
219
8
from __future__ import absolute_import from __future__ import division from __future__ import print_function from imlib.basic import * from imlib.dtype import * from imlib.encode import * from imlib.transform import *
0cd0f83a36973694c4283d2143fcb3a1553013b3f620bd386c05ecd472daedbb
Python
220
8
import numpy as np import json class NumpyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, np.ndarray): return obj.tolist() return json.JSONEncoder.default(self, obj)
31f00037a2d3445264486983fc09b2f54fc713770fe96c9280d5512e3194b1d2
Python
220
8
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tflib.checkpoint import * from tflib.ops import * from tflib.utils import * from tflib.variable import *
6362d9edf578e7d910d94fb11ad9d5b68b624b51660c4c3c3b9fc4b7d79e3447
Python
221
10
import numpy as np from numba import jit # @jit(nopython=True) def sample_rdpg(P, seed): np.random.seed(seed) A = np.random.binomial(np.int64(1), P) A[np.arange(len(A)), np.arange(len(A))] = 0.0 return A
944110fb56c4508f13543ea8392529e306bec907fe4cb32e2adf8add8870e192
Python
221
5
custom_params = {} custom_params['model_dir'] = 'nn_models/hphob_only/model_data/' custom_params['out_dir'] = 'output/hphob_only/' custom_params['feat_mask'] = [0.0, 0.0, 0.0, 0.0, 1.0] custom_params['n_conv_layers'] = 3
13aceb599510786629b95d790cf7d3f6d2e9ce5f13699710da9009c6e75de122
Python
222
10
""" NIRSimple ========= fNIRS signal processing simplified """ from .preprocessing import intensities_to_od_changes from .preprocessing import od_to_od_changes from .preprocessing import mbll from .processing import cbsi
a7b003f56bcc8369ef64512ee8f175dce825fd848d15360d8130bdad4df08425
Python
222
9
import torch from graphxai.datasets import Mutagenicity dataset = Mutagenicity(root = '../../explainers/mutag/data', split_sizes = (0.8, 0.1, 0.1), seed = 1234) print(dataset.test_index) print(dataset.test_index.shape)
fe1665bcc9d4e00f94a820ec9126f2ef4e24ac2f39c98d4012a06377f591e82b
Python
222
12
""" Optional imports class for RACCOON F. Comitani @2022 """ class OptionalImports: """ Static container to keep track of optional libraries and their imports """ hdbscan = False feather = False
ee61815b0a62049a55e281632e0884629e0bf93b018b3674d3a9efb947c6a25d
Python
223
5
custom_params = {} custom_params['model_dir'] = 'nn_models/all_feat_1l/model_data/' custom_params['out_dir'] = 'output/all_feat_1l/' custom_params['feat_mask'] = [1.0, 1.0, 1.0, 1.0, 1.0] custom_params['n_conv_layers'] = 1
6c2c77555701c75a71973a7b74b364f4422e683ce5710327092465d74dcbdeb5
Python
224
7
""" neuralop.data contains APIs for PDE datasets (.datasets) and APIs to transform raw data inputs into forms more suited to training machine learning models (.transforms) """ from . import datasets from . import transforms
913449e90f84635509226adef642bd608449fa13a48ff9d9a87944564cd8a8c0
Python
224
9
import tmkit as tmk def test_cath_summary_by_id(): res = tmk.cath.summary_by_id(id="1cukA01") assert ( res["domain"] == "http://www.cathdb.info/version/v4_2_0/api/rest/domain_summary/1cukA01" )
72f6f92275c6b4555bc6ebe42b6ded8fe0769b279c71452d609efa569a7bb3aa
Python
225
6
from .encoder import TextEncoder, SpeakerEncoder from .mel import mel_spectrogram from .tts_decoder import TTSDecoder from .vc_decoder import VCDecoder from .classifier import SpkClassifier from .f0_encoder import F0_Encoder
73e52ed8f9ad8d854bd134cc7c43e2eb8d7d6358bdf9b0c602604266df249b67
Python
227
8
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. from models import * from cait_models import * from resmlp_models import * #from patchconvnet_models import * dependencies = ["torch", "torchvision", "timm"]
44dc859a063b4dde7f02e088ba3f27884015c491819992c9201063819aa0b16e
Python
228
11
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import errno import os def mkdir(path): try: os.makedirs(path) except OSError as e: if e.errno != errno.EEXIST: raise
301872dcb4894eec6b06a9e2c7a32ba0807bf379b4b4dbae889f6d341e5983ce
Python
229
13
import mesh import mesh.plot.vedo_viewer as mplot folder = 'data/cilia_plane2' num_phases = 20 phases = [0, 5] mv = mplot.FlagellaPlaneViewer(folder, phases=phases, num_phases=num_phases) plotter = mv.show() plotter.close()
96fff3737015f730c361dbba351f508a22ddba5b000f8861be26b93f2622b1c4
Python
230
13
''' We can visualize 3D mesh with one of the supported packages. Best: vedo or trimesh ''' import mesh.plot.vedo_viewer as mplot folder = 'data/sphere_presaved/' m = mplot.MeshViewer(folder) plotter = m.show() plotter.close()
e192d6ae5b302de6ba3314b379b78d426ebe6ad028fcf09ae252a74ecd348239
Python
230
15
#! /usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Andalibi, V.' class ParameterNotFoundError(Exception): pass class RelativePathError(Exception): pass class InvalidConfigurationError(Exception): pass
425b66b450922b7eb823745d4eb50c9209755e6ea76b9cbf52447ca456f660d3
Python
232
11
from Classes.SPARQLDB import SPARQLDB class SearchComponent: """Abstract class from which other search module components inherit""" def __init__(self): # Setup SPARQL db access self.SPARQLDB = SPARQLDB()
768762831bcbf97308e2b0f2eb56e7353d45910d72d028c6706dfd15ce4c676c
Python
232
7
#coding:utf-8 from utils.parm import print_model_parm_flops, print_model_parm_nums def simplesum(model, inputsize, device=-1): print_model_parm_nums(model) print_model_parm_flops(model, inputsize=inputsize, device=device)
9f383b6408d5be348448bf554701b8c2a6cee017474ecd2060934f2838584dd0
Python
234
8
from eelbrain._text import enumeration def test_text(): "Test _report text functions" assert enumeration(['a', 'b', 'c']) == 'a, b and c' print(enumeration({'a', 'b', 'c'})) assert enumeration(['a', 2]) == 'a and 2'
8b8ca47bef85b5695936dce1cebfd1135fce05e87eae68a9338575e694f19d8c
Python
235
9
# Copyright (c) Open-MMLab. All rights reserved. from .hook import HOOKS, Hook @HOOKS.register_module() class DistSamplerSeedHook(Hook): def before_epoch(self, runner): runner.data_loader.sampler.set_epoch(runner.epoch)
d8be02d7e871c4fcb1eb8d9a3a735c38c48535ef2fbaef4626c020c66d1200dd
Python
235
6
from setuptools import setup from torch.utils.cpp_extension import CppExtension, BuildExtension setup(name='syncbn_cpu', ext_modules=[CppExtension('syncbn_cpu', ['syncbn_cpu.cpp'])], cmdclass={'build_ext': BuildExtension})
a10fe6f94fbf315690acb571e1f966cc7649952b8593973b5e0e3c96c22ad69b
Python
236
13
''' We can visualize 3D mesh with one of the supported packages. Best: vedo or trimesh ''' import mesh.plot.vedo_viewer as mplot folder = 'data/sphere_plane_presaved/' m = mplot.MeshViewer(folder) plotter = m.show() plotter.close()
b5eab4146ceceedd275b6e3b119dc1e04c28447a6546f0233fb11e66e125ee1d
Python
236
8
from .batch_processing import * from .folder_information import * from .units_conversion import * from .load_data import * from .configuration import * from .data_preparation import * from .load_model import * from .file_utils import *
1e5903273315df0609db6a1dee2826e3d4ef2cf27e917128f60c4360fbb6dfac
Python
237
13
import mesh import mesh.plot.trimesh_viewer as mplot folder = 'data/cilia_plane2' num_phases = 20 phases = [0, 5] # mv = mplot.MeshViewer(tdir) mv = mplot.FlagellaPlaneViewer(folder, phases=phases, num_phases=num_phases) mv.show()
23beb7caf846cb2a22cfa1a359f887845ecd3db78ce894de0b7eb85e92ab4367
Python
237
12
""" RACCOON (Resolution-Adaptive for Coarse-to-fine Clustering OptimizatiON) F. Comitani @2018-2022 A. Maheshwari @2019 """ from raccoon._version import __version__ from raccoon.main import * if __name__ == "__main__": pass
dcbade961a9dc92117a47639b7876996ef8cf4979cf070a007ae4240c1f697d6
Python
238
13
#!/usr/bin/env python from rectool import RecognizerToolbox import sys rt = RecognizerToolbox() if rt.use_existing_state_segmentations(): sys.exit(0) if not rt.use_existing_lnas(): rt.generate_lnas() rt.decode_state_segmentations()
09f472dad9233074f7027cd4ba0abc4a1a5b9773a9b3af4f94ebcaf6ab249f8a
Python
243
11
from iopath.common.file_io import PathManagerFactory _ENV_SETUP_DONE = False pathmgr = PathManagerFactory.get(key="M2TR") def setup_environment(): global _ENV_SETUP_DONE if _ENV_SETUP_DONE: return _ENV_SETUP_DONE = True
19d814e038fece44670981d420e47c8f54df3d872811dddafc10e90bf13e3166
Python
243
18
""" abc Created by: Martin Sicho On: 22.04.22, 10:40 """ from abc import ABC, abstractmethod class ConversionException(Exception): pass class MolConverter(ABC): @abstractmethod def __call__(self, representation): pass
0e51043d4bbb3d549bd1283f3a8df27ac873125be92852aa19e0e17c16d6065a
Python
247
12
import torch.nn as nn class Distribution(nn.Module): def __init__(self): super(Distribution, self).__init__() def sample(self): raise NotImplementedError def log_prob(self, value): raise NotImplementedError
87c836b254f1b907c0e19a761dbe257a71f77488720484de82779080c204771d
Python
247
13
import os from os.path import dirname, realpath, join import sys from .herbsgui import main def run_herbs(): current_wd = os.getcwd() script_dir = dirname(realpath(__file__)) os.chdir(script_dir) main() os.chdir(current_wd)