sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
f3fdd6b890e250124557cba35360a1297cac5bdbc4925325403b44bf290956e9
Python
2,034
60
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and rel...
14a67b2f0e9779408bff77fe97e93083e8538e18875a4ad2fda18e7e3accfa78
Python
2,036
63
#!/usr/bin/env python # SPDX-FileCopyrightText: © 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: MIT """ Blueprint Size Extraction Tool Connects to a CARLA server, measures every vehicle and walker blueprint via BlueprintLibrary's live spawn-probe, and writes the results to th...
04d23f6231497c7d34aec8eebffdeb8c854fc6b8e08cb75ac7bb1e50dbbf0f32
Python
2,038
56
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
082664def6acd1dab87e5a099e423d735b372dc9daa4e331222508801eca776e
Python
2,038
60
import warnings from collections import OrderedDict import torch.distributed as dist from mmcv.runner import OptimizerHook from torch._utils import (_flatten_dense_tensors, _take_tensors, _unflatten_dense_tensors) def _allreduce_coalesced(tensors, world_size, bucket_size_mb=-1): if buck...
568e06d32b5816411296babc0620128e198ad0ee4e53e493c4f808c59acafbdc
Python
2,038
68
import os import numpy from subprocess import Popen, PIPE import pymesh from default_config.global_vars import apbs_bin, pdb2pqr_bin, multivalue_bin import random """ computeAPBS.py: Wrapper function to compute the Poisson Boltzmann electrostatics for a surface using APBS. Pablo Gainza - LPDI STI EPFL 2019 This file ...
7f8e526c314e0e6b1bbd11909afe048d5d93ee6646d044380c3195298467b6a0
Python
2,038
54
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
8fb70672b00b2a34d1d506ce2d87e41a8fe16312ad61b873bf1f0634bb7ad285
Python
2,038
75
"""Post-hoc calculation of state-spectra using a multitaper. """ from sys import argv if len(argv) != 3: print("Please pass the number of states and run id, e.g. python 4_calc_multitaper.py 8 1") exit() n_states = int(argv[1]) run = int(argv[2]) #%% Import packages import os import pickle import numpy as n...
6685fe15d9f14094789ec6d128f9245b630e4c2225051d04ba24cf2609cd69fa
Python
2,041
59
''' Ohmic IK model with HH-like equations, for fitting depolarized responses in deciliated cells. ''' from file_management import * from brian2 import * from brian2modelfitting import MSEMetric from fitting import * from plotting import plot_fits from brian2.units.constants import faraday_constant as F from brian2.unit...
c226cf5e741af7b87116ae0c470ad79906fa9fa9747acba8346a5a675b5c47d1
Python
2,041
30
"""3D boxes of traffic lights + signs on the gallery RGB (static level geometry, same pose).""" import json, os, sys import numpy as np, carla from PIL import Image, ImageDraw D, OUT = sys.argv[1], sys.argv[2] meta = json.load(open(os.path.join(D, "meta.json"))); W, H, FOV = meta["w"], meta["h"], meta["fov"]; p = meta[...
fb7b5a91f770f8f67fc09f2d8f66240c07de0d25e85ca8afbcdd34b2e014a9c7
Python
2,041
66
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
6776812235de243fcba31fe5ed80e972ecb56c1938bd88a88411223c3591e7a5
Python
2,043
69
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. #!/usr/bin/env python import glob import os import torch from setuptools import find_packages from setuptools import setup from torch.utils.cpp_extension import CUDA_HOME from torch.utils.cpp_extension import CppExtension from torch.utils.cpp_ext...
bf75b0adcadddde3fa600abe8e8a1c901675241a6b50331feb8813c4c31033d5
Python
2,043
65
import random import torch import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import f1_score from graphxai.gnn_models.node_classification import BA_Houses, GCN, train, test from graphxai.datasets.feature import make_network_stats_feature from graphxai.explainers import GradExplainer from graphxai...
7b82a337b728f06594c83861386b7e2a2c6e06babb56cff8809f8bd4748b1181
Python
2,044
62
import probflow as pf import torch from torch import nn import torch.optim as optim from sklearn.model_selection import train_test_split class MultivariateRegression(pf.Model): def __init__(self, dims, head_dims): self.net = pf.DenseNetwork(dims) self.mean = pf.DenseNetwork(head_dims) self...
afc2da286f18206d2f14d3f24258abab43db987677a7efb9eeeac43abae8b6a3
Python
2,045
41
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0e9e5adf2255459d43274bff7a7151102b63c962208e7e5c61e0f4e56948193c
Python
2,046
65
""" The processing module contains functions to process fNIRS signals. """ import numpy as np def cbsi(delta_c, ch_names, ch_types): """ Apply correlation based signal improvement (from Cui at al., 2010) to hemoglobin concentration changes. Correlation based signal improvement (CBSI): x_...
110c4932eed69e1d189efe35a81fabe47623a48fdcfd4f81ac1ebd9293c4c61f
Python
2,046
34
# Class to create a codon table for humans # data from http://www.kazusa.or.jp/codon/cgi-bin/showcodon.cgi?species=9606&aa=1&style=N retrieved on 11/20/2014 # accessor methods to return avg codon frequency for a sequence or to find the stretch of N codons with minimum frequency, and what that frequency is class Hum...
815c83bb0a9dc87d214909b6da766485ace6d61072e8b437a097617d2059c2fb
Python
2,047
77
#%% import os try: os.chdir('/Volumes/GoogleDrive/My Drive/python_code/connectome_tools/') print(os.getcwd()) except: pass #%% import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import connectome_tools.process_matrix as promat import pymaid from pymaid_creds import...
869b51863f73f3e3d6ec5a607bda1b0bad41219018b182184205ae522c9b1ec2
Python
2,048
55
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
c5c3026445ac2dc26517f2e6b036f6fedcf64fdfa1d62fd75a4a4a23d6f48bf6
Python
2,048
53
"""Restore the tire-force application point used by the legacy two-wheelers. Run with UnrealEditor-Cmd <project> -run=pythonscript -script=<this file> -nullrhi -unattended -nosound. Set FIX_TWO_WHEELER_DRY_RUN=1 to inspect only. These assets balance on four virtual outrigger wheels with a lowered center of mass. Phys...
bbd9be0a6f053e5975fd66daacaa08eaa1af0478d6f8793c0541a675f567c569
Python
2,049
59
''' Ohmic IK model with bell-type time constant, for fitting depolarized responses in deciliated cells. ''' from file_management import * from brian2 import * from brian2modelfitting import MSEMetric from fitting import * from plotting import plot_fits from brian2.units.constants import faraday_constant as F from brian...
d1e94f2d3df811d8bcb4740de80500b621f648a62b88c0edda43256bdb5c42e6
Python
2,049
56
import unittest import numpy as np from alpamayo_rig import ( CAMERA_INDICES, CAMERA_NAMES, DASHBOARD_CAMERA_INDICES, DISPLAY_CAMERA_INDICES, TRAJECTORY_CAMERA_INDICES, ) from alpamayo_schema import validate_request def valid_request(): metadata = {"camera_names": list(CAMERA_NAMES)} arr...
1518cd75bd54c2e9238a44903fee020d3fcacd5639cea2c17bb10919a0c3de02
Python
2,050
52
from numpy.distutils.core import setup, Extension from numpy.distutils.misc_util import get_numpy_include_dirs import os, sys mods = ['gradunwarp.core.coeffs', 'gradunwarp.core.globals', 'gradunwarp.core.__init__', 'gradunwarp.__init__', 'gradunwarp.core.utils', 'gradunwarp.core.unwarp_resamp...
08b745a432c6f0f9f768f4ecb2bce47e7fdb1a9863479fe08eb11cd60042d043
Python
2,052
53
# Copyright 2020 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
adf1c18490422d33a559f5cdf09aadfb857ac459c7f4b0f875af3d776bb12bb8
Python
2,052
50
"""Apply neurotransmitter-based excitation/inhibition signs to the connectome. Winding's Supplementary Data S1 does NOT include neurotransmitter labels — those live in the Science paper's Supplementary Table S2. Until that table is wired in here, we fall back to canonical-class conventions that are correct for >95% of...
b042772936382e974f400c30c1585d58603e3a60f8284465ef694e4561ed38a5
Python
2,053
54
import logging import subprocess from pathlib import Path from typing import List def pipe_subprocess(cmd1: List[str], cmd2: List[str]): # https://stackoverflow.com/questions/13332268/how-to-use-subprocess-command-with-pipes # https://stackoverflow.com/questions/13332268/how-to-use-subprocess-command-with-pipe...
257b0a06b7dbb9d31f42e9c1b1a383c9d4d3bbcec13f88e131c349a1ecffe8f6
Python
2,054
84
#!/usr/bin/env python """ GTF.py Kamil Slowikowski December 24, 2013 Read GFF/GTF files. Works with gzip compressed files and pandas. http://useast.ensembl.org/info/website/upload/gff.html Downloaded by SNF on 12/30/14 from https://gist.github.com/slowkow/8101481 - pandas support removed to minimize package re...
9017e79d8b68d641c348d5217ac95f2788f9c1216543aef3b80100c87db65f76
Python
2,055
50
# %% from pymaid_creds import url, name, password, token import pymaid rm = pymaid.CatmaidInstance(url, token, name, password) import matplotlib.pyplot as plt import seaborn as sns import numpy as np import pandas as pd import connectome_tools.process_matrix as pm import connectome_tools.celltype as ct import navis ...
ce1000d7f46cb49cb0a5400845ed4979e695b40040743178fb29d0b9dcebd718
Python
2,055
49
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
2f8044ee9c6f610f35ddcdb4b5668cb038617f5640a93440ea3b360dc785e205
Python
2,056
79
import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from scipy import optimize def pred_CV_squared(n, pr): """square of CV should be given by following formula""" ###CV^2 = (1 - pr[ca])/ (n * pr[ca]) #vector size of pr return (1 - pr)/(n * pr) def fit_CVs (N, CVs): ...
a40b6182d5376ddcc99edb8f77ef02d685fab10083c54a3d8d140ed7143fbf3e
Python
2,056
56
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
b9553c2603da9292a6919984a31b42dfd2a6bd6767418442155af5bde8e6b733
Python
2,056
57
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
f23f7d1862c7c2eaade120ef880a91341fe515ab2b1f59ee02145a76fc49f7be
Python
2,056
56
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
11995e0bfeeb7abcd563132ec2140cfc03f21e0c7d159e88b4552987a78f18c4
Python
2,057
63
## import os import h5py import scipy.sparse as sp_sparse import time import scanpy import anndata ## ============================================================================= ## Run Code ## ============================================================================= ...
4e80a60f70b059366863983e3c2d95bcded4a0c6a84b67e294606043aa8d0158
Python
2,057
72
import sys import numpy as np import circularFiltering as flt from time import time kappa_z_array = np.array([0.01,0.03,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,2,3,4,5,6,7,8,9,10,30,100]) len_kz = len(kappa_z_array) # translate input varibles kappa_star = float(sys.argv[1]) beta = float(sys.argv[2]) # number of iterat...
9b6031bc715fe0aacee5b222051f82f6485c7b77c6a389a6392a390535d7e024
Python
2,057
55
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
9d5914317abfa8dfbd7d7c326ad17540a3539342e5d56de26b3114fe8068c930
Python
2,057
50
# Copyright (c) Open-MMLab. All rights reserved. from itertools import chain from torch.nn.parallel import DataParallel from .scatter_gather import scatter_kwargs class MMDataParallel(DataParallel): def scatter(self, inputs, kwargs, device_ids): return scatter_kwargs(inputs, kwargs, device_ids, dim=sel...
e4b2443328522f6f10c3e38236e0babbe56c8e502826ae7ce26ee66c48cc0ff8
Python
2,057
51
import torch from .roi_keypoint_feature_extractors import make_roi_keypoint_feature_extractor from .roi_keypoint_predictors import make_roi_keypoint_predictor from .inference import make_roi_keypoint_post_processor from .loss import make_roi_keypoint_loss_evaluator class ROIKeypointHead(torch.nn.Module): def __i...
33a4aa0ce45168ebfd82060cdd7b9893f7dac7f7bea99f74bf7ad5a1457906c4
Python
2,059
51
from builtins import super import numpy as np from .expectation_maximization_registration import expectation_maximization_registration class affine_registration(expectation_maximization_registration): def __init__(self, B=None, t=None, only_t=False, *args, **kwargs): super().__init__(*args, **kwargs) ...
d020d57df44d59c481bad8e698b01c6cdac5216c73598783d520c3cce6b55fc4
Python
2,060
57
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
6d88c4e937f5b589d04e6a75c7ef03e84d0b6beb2a84d72f58ccc45bf7568bc6
Python
2,061
64
#//============================================================= #//Copyright(c) 2011 G. Gogoshin #//Distributed under MIT-style license. #//(see LICENSE.txt or visit http://opensource.org/licenses/MIT) #//============================================================= # Do not modify next 6 lines import bnomics impor...
785753747fae204ec3fd169e8e481f169d6b0d7ae75f4f80068c02baaa478087
Python
2,061
68
import sys sys.path.insert(0, '.') import numpy as np import torch import time def computeTime(model, device='cuda'): inputs = torch.randn(30, 3, 512, 512) if device == 'cuda': model = model.cuda() inputs = inputs.cuda() model.eval() time_spent = [] for idx in range(100): ...
92a1a04b20621d76b5cb3ac454fcc8b54350580d34b2e1ee6505e907bb53bbb8
Python
2,061
65
import random import torch import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import f1_score from graphxai.gnn_models.node_classification import BA_Houses, GCN, train, test from graphxai.datasets.feature import make_network_stats_feature from graphxai.explainers import IntegratedGradExplainer fro...
f54ad32096a0e2f69f712c893bff4ee966a1576b1a1c6eac754578d575ec2141
Python
2,062
49
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
14a5522be5d6b2559d51f62e24a1a0ddbd48e89e4aaa2c2c0672c5d8022e68d9
Python
2,063
63
#!/usr/bin/env python """Example segmentation script To generate normalized cuts ROIs in all SIMA datasets: >> python segmentation.py /path/to/sima/datasets For help and additional arguments: >> python segmentation.py --help """ import os import argparse from sima import ImagingDataset def locate_datasets(search...
27920e84965ecaf8e21d167c3e9aeb03b7ed80bfa497d5b4c7496dde25f8bf74
Python
2,064
68
from random import randint from subprocess import Popen, PIPE from hcbr import HCBRClassifier import numpy as np from sklearn.metrics import accuracy_score, matthews_corrcoef from sklearn.model_selection import train_test_split, RepeatedStratifiedKFold, RepeatedKFold HCBR_BIN = '../../../build/hcbr' DATASET = 'brea...
0b32e77eb416c1b2de8c9018a1ee8b5e59bd0e1b455b43db556426a1154bc922
Python
2,065
76
#%% from pathlib import Path from operator import itemgetter import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from graspy.datasets import load_drosophila_left, load_drosophila_right from graspy.plot import heatmap from graspy.utils import get_lcc data_path = Path("./maggo...
08f419a6277d4f4b8d17d5a389ad09d8e2403c62c84429d5e59ed7eddd8d031a
Python
2,066
62
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from torch import nn class FastRCNNPredictor(nn.Module): def __init__(self, config, pretrained=None): super(FastRCNNPredictor, self).__init__() stage_index = 4 stage2_relative_factor = 2 ** (stage_index - 1) r...
c9e1836c5eec9f70ed4c408b6cfef1182360e311e28f76d6594bc3b8b52f0191
Python
2,066
56
import torch.nn as nn import math from .derive_blocks import derive_blocks from .operations import Conv1_1 class ImageNetModel(nn.Module): def __init__(self, net_config): super(ImageNetModel, self).__init__() self.blocks, parsed_net_config = derive_blocks(net_config) self.blocks.append(Con...
ee4f1c1f674a4aa97c1b00ada03654efc3a01f3313b62d38fcf25d86d5af7435
Python
2,067
54
#################################################################################################### # Copyright (c) 2019 - 2023, EPFL / Blue Brain Project # Author(s): Marwan Abdellah <marwan.abdellah@epfl.ch> # # This file is part of VessMorphoVis <https://github.com/BlueBrain/VessMorphoVis> # # This program is free ...
16f440f390c58f80b4dcdfaede811dd8b6b7de29ea166167d631b45bedd5d547
Python
2,068
38
from .bbox import bbox_overlaps from .carafe import CARAFE, CARAFENaive, CARAFEPack, carafe, carafe_naive from .cc_attention import CrissCrossAttention from .corner_pool import CornerPool from .deform_conv import DeformConv2d, DeformConv2dPack, deform_conv2d from .deform_roi_pool import (DeformRoIPool, DeformRoIPoolPac...
0caae856c3fe334778d5b82a4ab625ee2d23b617c59e664e9972617a4be068f6
Python
2,069
88
import numpy as np import pandas as pd from sklearn.manifold import TSNE from sklearn.preprocessing import StandardScaler, LabelEncoder, normalize import matplotlib.pyplot as plt import seaborn as sns import pickle ds = pd.read_csv('results/Y_Test_SF.csv') y = list(ds["SF"]) print(y) filename = 'results/SF_Test_P...
2013f24a7561629073143eebb51f9ec69d6d21fff3f834952490c251dda9494b
Python
2,071
59
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
d83e3c169d87eca08aa79568b535c16e7bd8582f6cb88e0495b61e2538ba70c8
Python
2,071
68
import matplotlib as mpl; mpl.use('Agg') from matplotlib import pyplot as plt from matplotlib import lines as mlines import numpy as np from scipy import stats import pprint import pandas as pd experiments = ['learn','devalue','reversal','punish','reversal_prat','punish_prat'] # define the axis now because we are go...
0c03471b800ed52c5319553a8396b21b548506fad7ba3cfb37b34aca1d78e0e3
Python
2,072
64
from __future__ import print_function, division import numpy as np import multiprocessing from ase.db import connect from piml.feature.voronoi import Voronoi from piml.regression.regression import Regression lr = 0.01 atom_fea_len = 64 n_conv = 3 h_fea_len = 128 n_h = 1 descriptor = Voronoi(max_num_nbr=12, ...
ce724874c61922e87df7f093b47c23af8233852cf0eca3b48e5aae50e9be947b
Python
2,072
64
from __future__ import print_function, division import numpy as np import multiprocessing from ase.db import connect from piml.feature.voronoi import Voronoi from piml.regression.regression import Regression lr = 0.01 atom_fea_len = 64 n_conv = 3 h_fea_len = 128 n_h = 1 descriptor = Voronoi(max_num_nbr=12, ...
e99758b40cb80e97d254c2dc178e50bd19133f56430c330a3bd727809c0af28b
Python
2,072
79
# -*- coding: utf-8 -*- import sys, cv2, zlib, pickle, struct, socket, traceback from time import sleep from kafka import KafkaProducer from getopt import getopt, GetoptError from sys import argv def help_(salida=0): print("Ayuda sobre el injestor de Kafka") print("---------------------") print("\t-h:\tIm...
5719f74865b25d30e2fa2d6805f8d0309d25617fb77b5f5616716fc446f28778
Python
2,073
60
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
326741934bece7a8fd951dbc64a16e8af388283be60e231427b3d81456148aae
Python
2,074
52
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
2cf937564da2845cadbbe2d141b33e8b6c346dc835cac7808e481b8fe78229db
Python
2,075
47
import time from carla_cosmos_server.gc import collect from conftest import submission, upload def test_ttl_collect(server, clip16): cam = clip16.manifest.camera_names[0] rgb = upload(server, clip16.video("rgb", cam)) depth = upload(server, clip16.video("depth", cam)) body = submission(clip16, "cosm...
8166826a5df591e3c1b63dd22cee3f9ea9813ad197c22004afe5d23304b67af1
Python
2,077
46
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
c773fbebb0ee9a575d88e44bd3da13d82bbea92df28c859daeda9f7b8a1ed9df
Python
2,077
46
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
5aedab80ea3bdca2e3d2b334e9caf1a614aab707ff6bb1c5b5f3886e6c41c325
Python
2,078
65
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
d7cd2912cf6dff23a50267a56a55fb14079f91c1c9d9a2ad11ce31c0d42d4f5c
Python
2,078
54
import os from pathlib import Path import pandas as pd import numpy as np import matplotlib.pyplot as plt import networkx as nx from brainNetwork.util.path import get_local_datadir, get_fig_dir from brainNetwork.util import connectome, util import itertools from scipy.stats import ttest_ind # Paths csv_dir = Path(get...
4f142db4a58bd230cb1b854c3bbde7cdd2f53c524d29cc39ad06c89b3ac95452
Python
2,079
51
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
7f82a9eb554df128e4ab1387235576d63e9888fe3e6189882b5cde2f468f61d3
Python
2,079
73
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 10 15:57:11 2021 @author: Antonio G. Zippo, PhD, Institute of Neuroscience, Consiglio Nazionale delle Ricerche """ import numpy as np from importlib import reload import matplotlib.pylab as plt import spikeinterface.toolkit as st import spikeinterfa...
e182ec4d5bf953f5bcf6404bf3353a0c004d36b8a53389e0b1fbe804ebf0e3c4
Python
2,081
52
import unittest from linkml_runtime.dumpers import yaml_dumper, json_dumper from linkml_runtime.utils.introspection import package_schemaview from oaklib.datamodels.search import create_search_configuration, DEFAULT_SEARCH_PROPERTIES from oaklib.datamodels import search_datamodel from oaklib.datamodels.search_datamode...
71b19cf1b9128e1df693296227b9dcffa014b66fee3f8f60ed5fb79a1e0f5537
Python
2,082
59
#!/usr/bin/env python3 """ File: merge_groups.py Created: 2020/03/13 Last Changed: 2020/03/19 Author: M.Vochteloo Copyright (C) 2020 M.Vochteloo This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softwa...
69eb190f4b449385c0b61ca24e67f96fb074c2ade1e3a62c2ce143bd2b5a05a9
Python
2,083
53
from pathlib import Path import cv2 import pandas as pd from cenfind.core.data import Dataset from cenfind.core.visualisation import draw_foci from cenfind.constants import datasets from cenfind.publication.detectors_other import log_skimage, simpleblob_cv2 from cenfind.core.detectors import extract_foci PREFIX_REMOT...
248ade188a57680230fe4d42f2d22cbca81f62d41034e6678758962865625611
Python
2,084
69
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. #!/usr/bin/env python import glob import os import torch from setuptools import find_packages from setuptools import setup from torch.utils.cpp_extension import CUDA_HOME from torch.utils.cpp_extension import CppExtension from torch.utils.cpp_ext...
0d2b3f311271fcc1c66d2c856224f2d0783f2a7916913f6380e81a0ddc77896f
Python
2,085
75
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
369f562cc091c0dcb8c8331f9ec34621c6960df2e712e963d5b4af793c5a7399
Python
2,085
48
rule train_demux_nn: input: 'traindata/signals-{run}-s{size}-t{trim}.hdf5' output: testpreds='models/{run}-s{size}-t{trim}-l{preset}/test-predictions.txt', model='models/{run}-s{size}-t{trim}-l{preset}/final-model.hdf5' threads: 99 run: import json import subprocess as sp...
7636e1346fb010a809fdb3f07be69c392f2bba576142724aa419551d736f9bff
Python
2,085
61
#!/usr/bin/env python3 # Copyright 2018 Hossein Hadian """ This script computes the image lengths (with padding) in an image data dir. The output is written to 'image2num_frames' in the given data dir. This file is later used by image/get_allowed_lengths.py to find a set of allowed lengths for the ...
87070503db0c69c221504b329d378405fba4220f621ff325143021b7f853a92e
Python
2,085
56
""" Utilities for working with ontology subsets (slims) ---- """ import logging from typing import List, Dict from oaklib.interfaces import RelationGraphInterface from oaklib.interfaces.obograph_interface import OboGraphInterface from oaklib.types import CURIE, PRED_CURIE def filter_redundant(oi: RelationGraphInterf...
ca7e5a85f825a584d545593a90747d8004aed0d0b68fd70092f7da36bfb88da2
Python
2,087
75
import pandas as pd import numpy as np from sklearn import linear_model from typing import Optional, Protocol from rl_analysis.util import ScikitModel, ScikitSplit def model_fit( model_features_z: pd.DataFrame, splits: ScikitSplit, return_models: bool = False, x: list[str] = ["signal_reref_dff_z_max"]...
10ff9a30b4bc5f66cecd9346981c4596b663575e98b2f398f38e336bc0ed33ed
Python
2,089
76
''' Figure 5 Activation curve of IKir ''' from os.path import expanduser import os import pandas as pd from pylab import * import matplotlib.pyplot as plt from file_management import * from os.path import join width, height = 2, 2 table = pd.read_csv(join(config['root'], 'Ciliated 4 mM KCl', 'tables', 'selection_hype...
9643cf14637a6746aeb0d4b91984fb8c5af084d84c02dbb6171b7e979aaf1a9f
Python
2,090
60
from copy import deepcopy import torch import torch.nn as nn from .base_model import BaseModel class UQNO(BaseModel, name="UQNO"): """Uncertainty Quantification Neural Operator General N-dim (alpha, delta) Risk-Controlling Neural Operator, as described in [1]_. The UQNO is trained to map input fu...
1c303f93a354bc2467312397008bc14bb003cf4470bbe72ca06f62234366c34e
Python
2,091
60
# Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma # de Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """Forward-looking regression guards for NumPy 2 compatibility. NumPy 2 removed `np.bool` (in 1.20)...
38a04ff0feffbe61067447b74a1546553f84f21fe2e7a183a2d61fa540a34801
Python
2,091
63
#!/usr/bin/env python # plotVm ver 0.5 - a command line utility to plot a wildcarded argument # list of files containing membrane potential data, and plots them in # different colors on the same axes import sys, os import matplotlib.pyplot as plt import numpy as np def plot_file(file,format): print 'P...
78351839306a2fdb3a2e167ee69b431936a325fc3bc9d21de070580b455c3c39
Python
2,091
64
from model.united_model import ModelPVRNNSoftmax class ConfigSoftmax(): model_class = ModelPVRNNSoftmax data_dir_common = 'data/wcst/limited_sm/' data_size = 18 epoch_size = 10000 # 200000 run_name = 'sample/short-epoch' params = { # Model name. 'model_class_name': model_clas...
996ba182d64a4e70767c10881423b51be3a639d56b56df4f1dd5684d67fc25ea
Python
2,092
64
#!/usr/bin/env python # Copyright 2014 Gaurav Kumar. Apache 2.0 # Processes lattice oracles import os import sys oracleDir = "exp/tri5a/decode_callhome_train/oracle" wordsFile = open('exp/sgmm2x_6a/graph/words.txt') conversationList = open('/export/a04/gkumar/corpora/fishcall/jack-splits/split-callhome/train') or...
d6aca764eeb2d987c61278a55c47c7047bf3170b473c4bdcadca321075d2bedc
Python
2,093
54
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from .box_head.box_head import build_roi_box_head from .mask_head.mask_head import build_roi_mask_head class CombinedROIHeads(torch.nn.ModuleDict): """ Combines a set of individual heads (for box prediction or masks) into a ...
2b6b921f8dc722f56f6deb878dbfb6fc7a9ce5ed40e18abade28750e6275a738
Python
2,095
63
from typing import Optional, List import numpy as np from rdkit.Chem import MolToSmiles from RAscore import RAscore_NN, RAscore_XGB from drugex.training.interfaces import Scorer NN_MODEL_PATH = None XGB_MODEL_PATH = None def calculate_score(mol: str, use_xgb_model: bool = False) -> Optional[float]: """ Give...
3584f23dc8e951c9ab4666f69bd22f3ca927a23744a2ebeb62bb698937b3f558
Python
2,095
46
#################################################################################################### # Copyright (c) 2019 - 2023, EPFL / Blue Brain Project # Author(s): Marwan Abdellah <marwan.abdellah@epfl.ch> # # This file is part of VessMorphoVis <https://github.com/BlueBrain/VessMorphoVis> # # This program is free ...
4cb1dbafea5f8822712cd4e3b2210e0a19af6a70adda9eb9392bec2769ff0447
Python
2,095
74
import sys import numpy as np import circularFiltering as flt from time import time kappa_z_array = np.array([0.01,0.03,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,2,3,4,5,6,7,8,9,10,30,100]) len_kz = len(kappa_z_array) # translate input varibles N = int(sys.argv[1]) # number of iterations to average nIter = 10000 # mode...
27a4e7fc59d099145ae092a429202341ad938a461bc0fdb282926573417de7e7
Python
2,096
61
import os import sys import json import time import pandas as pd import datetime from dicom_scu_class import Retriever_SCU def find_daily_treatments(day): infofile = "setup_information.json" f = open(infofile) info = json.load(f) scu = Retriever_SCU(info['ARIA']['AETITLE'], in...
4c57ef88bb62055a6a3b812cbd1fa1d75687f9c948b1833fc7942aabb18266fc
Python
2,099
60
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
3ca456faee16f167a33cd568efe69eb2b06116a38098b2b44f190df94455e55d
Python
2,100
65
''' A linear model with one electrode and neuron, no drift. We fit it to small stimulations. This is used to get electrode parameters. ''' from file_management import * from brian2 import * from brian2modelfitting import MSEMetric from fitting import * from plotting import plot_fits path, display = fit_arguments(defau...
07066318a3c751b61b55c9e01834ce77b2adaa12b8f97674475bc380e03bad11
Python
2,101
66
"""Parser for GAF association formats""" import csv from dataclasses import dataclass from typing import Iterator, Optional, TextIO, Union from oaklib.datamodels.association import ( Association, NegatedAssociation, ParserConfiguration, ) from oaklib.parsers.xaf_association_parser import XafAssociationPar...
e7241602b9e412d7b3129e34c966d863e2e4cf9d6cfb13defe7916d37e59f750
Python
2,101
57
# This script is part of navis (http://www.github.com/schlegelp/navis). # Copyright (C) 2018 Philipp Schlegel # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
25f7f9bf5916693eb2d7820546df911ba6556257be2f3f6ce7fa6f3985c4cc12
Python
2,102
63
from typing import Optional, Union, List import numpy as np from rdkit.Chem import MolToSmiles from RAscore import RAscore_NN, RAscore_XGB from drugex.training.interfaces import Scorer NN_MODEL_PATH = None XGB_MODEL_PATH = None def calculate_score(mol: str, use_xgb_model: bool = False) -> Optional[float]: """ ...
90177d14b79077fb14fd04ce0e7a812e442e6021499e4135aea9c3ec2020d766
Python
2,102
46
#!/usr/bin/env python3 # encoding: utf-8 # @Time : 2017/12/16 下午8:41 # @Author : yuchangqian # @Contact : changqian_yu@163.com # @File : mclane.py from datasets.BaseDataset import BaseDataset class PascalContext(BaseDataset): @classmethod def get_class_colors(*args): return [[0, 0, 0], [0, 0, ...
a52f52d508e0f6a0ad633f2a43a45b2336d896ac5f54fdf961335bd99de0726f
Python
2,102
59
#!/usr/bin/env python3 """ File: optimize_covariates.py Created: 2020/10/13 Last Changed: Author: M.Vochteloo Copyright (C) 2020 M.Vochteloo This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software F...
aeb6aa956f7b3edb8c3c7efd1369dbf2a953dce443f5b6692fb7098f9dd9ca11
Python
2,102
58
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
a17299728d1a2f19951270636efebb56268c28dd2dabfd8913a2b14a237c29ce
Python
2,103
58
import os import os.path as osp import torch import torch.distributed as dist import mmcv from mmcv.parallel import collate, scatter from mmdet.core.evaluation.eval_hooks import CocoDistEvalmAPHook class CocoDistEvalmAPHook_(CocoDistEvalmAPHook): def after_train_epoch(self, runner): if not self.eve...
7855ae2c511f168739fd630a2a6adb8e1ab03f79f1af84dac745b8f656d4402e
Python
2,105
74
"""Nottingham MEGUK: Preprocessing.""" from glob import glob from pathlib import Path import matplotlib matplotlib.use("Agg") import mne from osl_dynamics.meeg import parallel, preproc # ---------------------------------------------------------------------------- rawdir = Path("data/raw/Nottingham") outdir = Path("...
4d1a3e6b46994bb05478215bef642263e6b47500828150b4a911094873142041
Python
2,106
59
''' Tools for PIV analysis. ''' import numpy as np from scipy.stats import circmean __all__ = ['interpolate_piv', 'corrected_cell_angle', 'reversal_duration'] def reversal_duration(angle, start=None): ''' Returns the duration of reversal from the angle sequence, in time steps. The angle is assumed to be r...
920336ccc8bbaf3ae68c7be0bc48a1c1dbd4de014256365bd82d685fc1811ba6
Python
2,106
42
import logging import unittest from oaklib.implementations.bioportal.bioportal_implementation import BioportalImplementation from oaklib.implementations.ols.ols_implementation import OlsImplementation from oaklib.implementations.ontobee.ontobee_implementation import OntobeeImplementation from oaklib.implementations.pr...
c86475492e916dec267b862437c299ebdc7b17dcf56a9a471f7e7a8793830c93
Python
2,107
58
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
f42efeb9f19efad3a94a89068d5a29fa45fbf015475708f79608fc6ad1b93337
Python
2,108
64
# -*- coding: utf-8 -*- import numpy as np from sklearn.linear_model import LinearRegression from . import utils from ._base import _ConventionCausality class GrangerCausality(_ConventionCausality): def fit(self, data, ddof=1, **kwargs): self._preprocess(data) self._fit_data(ddof=1, **kwargs) ...
c5648cadbfd962692998f706d11735f7d5e0a4f76dbda41ceb539b67a2e93c72
Python
2,110
68
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from torch import nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from maskrcnn_benchmark import _C class _ROIAlign(Function): @staticmethod...