sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
b69b2765f9736a810b79ddeb8309f68b95256d785dea6a6a6f2f1e21179c1389
Python
7,940
178
from .vehicle_wheel_smoke_test import VehicleWheelSmokeTest import carla import math ANGLE_TOLERANCE_DEG = 2.0 OFFSET_TOLERANCE_M = 0.01 STEER_DEG = 20.0 PITCH_DEG = 45.0 SUSPENSION_M = 0.05 WHEELS = ( carla.VehicleWheelLocation.FL_Wheel, carla.VehicleWheelLocation.FR_Wheel, carla.VehicleWheelLocation.B...
4f7005b8517ae72c19abc681d8fac4f59400d7a4d8f33953bd97a85db631958c
Python
7,941
140
__author__ = 'duarte' from modules.parameters import ParameterSet, extract_nestvalid_dict from modules.input_architect import EncodingLayer, InputNoise from modules.net_architect import Network from modules.io import set_storage_locations from modules.signals import iterate_obj_list from modules.analysis import single_...
8d09c1d00e0d41b76feecacb22d6b7d50c929901bde75484078fad55b8bbc60c
Python
7,945
208
#!/usr/bin/env python3 """Author and validate a <Name>.Package.json for a CARLA standalone asset package. PrepareAssetsForCooking locates the file by RECURSIVE SEARCH under Unreal/CarlaUE4/Content, so the package name is just the filename minus ".Package.json" — no matching directory is required. That is what lets sto...
4e0799ebf70fe8ce5de3710664790968b3742e6063a0abfdd3b9957614c91ebe
Python
7,946
188
""" Module including helper functions for feature extraction and other stuff including metrics, jsonhandler, etc""" import json from collections import Counter import logging import re import numpy as np import string logger = logging.getLogger('classifier') regex_find_citation = re.compile(r"\(\s?(([A-Za-z\-]+\s)+([...
451914de4a1fa1bb0756fd7874b77b1617a1367d6234b49efda710968956087e
Python
7,950
198
""" MODULE VERSION: Create peptide GRO and ITP from an amino acid sequence and an ssdump secondary structure. """ import subprocess import shutil import os import core.settings as CoreSettings import core.system as System import core.gromacs as Gromacs import core.gromacs_commands import user.usersettings as UserSet...
8d6831936d8eebb986d2f92fa7718dd4da549eb860418e559a1bd60993ea45a5
Python
7,951
201
# 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...
3d5035a6d25c65cf9adce13b8d41e82dedc816e7c9129ae5d4d9c24f714a8ab4
Python
7,954
138
#%% import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt from pymaid_creds import url, name, password, token import pymaid rm = pymaid.CatmaidInstance(url, token, name, password) import connectome_tools.cluster_analysis as clust import connectome_tools.celltype as ct import con...
2bd044146a3de19e68c2df43f617164519058c385146c6fb02920f219450c4e6
Python
7,967
224
import unittest import numpy as np from grr.ThresholdModel import constructMedianModel from grr.ModelStimulus import ModelStimulus from ezephys import stimtools class TestSimulateDoesNotCrash_VectorInput(object): def setUp(self): self.dt = 0.1 self.V0 = -70.0 self.spkTimes = [50.0, 700.0...
d91b017eaaba961da588326c5784b3316938d6695ac7af02573e586cab1ef6e4
Python
7,969
300
# %% [markdown] # ## import os import time import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from scipy.stats import poisson from graspy.embed import OmnibusEmbed, selectSVD from graspy.match import GraphMatch from graspy.models import DCSBMEstimator...
a849541afbe64c02252f11bee02e107d5000dc8c6b8b219f48c8ff12d482b9b2
Python
7,971
195
""" File: create_cov_matrices.py Created: 2020/03/12 Last Changed: 2020/06/03 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 Foundation, eit...
cc72291b2895db7aa37d5a93ce72368ff45e75b095812cc32bb0d84f9f5e762a
Python
7,978
201
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
eb584a4cf28d56cd8afea10f7cfe566d40fa6733336b006f09d07ea8c4a21069
Python
7,982
230
# System libs import os import time import argparse from distutils.version import LooseVersion # Numerical libs import numpy as np import torch import torch.nn as nn from scipy.io import loadmat import torch.utils.data as data import nibabel as nib # Our libs from data.augmentations import ComposeTest, PaddingCenterCro...
26de722d723361d0057d8eb977fd032fc2f2fd9434c84adbb2cf0426bd5b5df9
Python
7,986
176
# 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...
202ae7bd9df7f1b23bf4a452f1c5691176d51ec170bdcd097b400fce3845c744
Python
7,987
244
import numpy as np import logging from scipy.special import lpmv, gammaln from tqdm import tqdm import math from dipy.reconst.gqi import squared_radial_component from dipy.data import default_sphere from dipy.tracking.streamline import set_number_of_points from scipy.linalg import blas logger = logging.getLogger(...
3972cce0f8e4b67e14e68ea465a7496efa23456e02ad70810c563ae3445e9c4d
Python
7,987
287
#%% from itertools import chain from pathlib import Path from giskard import graph import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from matplotlib.colors import ListedColormap from matplotlib.lines import Line2D from sklearn.metrics import pairwise_distances from src.data ...
57df1595d09d0bcea451a16203b6424ad4a13bc9f58aa2f83451f0dd65cc5743
Python
7,992
297
import numpy as np from collections import namedtuple from scipy import stats from scipy import optimize import statsmodels.api as sm import statsmodels.formula.api as smf from sklearn.decomposition import FastICA GroupStats = namedtuple("GroupStats", ["xs", "centers", "ns", "lowerbnds", "uppe...
f9f1fc5f02d262efa003f122fbdc0b7081c1de5504e126a8c95398b6c5567a88
Python
7,993
192
""" File: main.py Created: 2020/06/08 Last Changed: 2020/06/11 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 Foundation, either version 3 ...
44867aab3092627acdaa829461106f27df714d55158e017ab4ad8df4d6b35de9
Python
7,997
145
# %% # generate cascades from individual neuron pairs and individual nonpaired neurons from data_settings import data_date, pairs_path from pymaid_creds import url, name, password, token import pymaid rm = pymaid.CatmaidInstance(url, token, name, password) import numpy as np import pandas as pd import pickle from co...
203a3e9e28696816ffaab8260707accf7e27437017fd3ff93a64f8e7007d2959
Python
7,998
221
import os import sys import numpy as np from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * import pyqtgraph as pg from .uuuuuu import read_qss_file reset_button_style = ''' QPushButton{ background: #656565; border-radius: 5px; color: white; border-style: outset; bor...
d65c8e4f004a9759497b643480644d060f5dbc223887585aa7e054c3ed84de7e
Python
7,999
182
#!/usr/bin/env python3 """Check a file is a usable input for the walker pipeline — the FIRST thing to run. python3 check_input.py ~/models/SK_MyPed.fbx Four gates, cheapest first, no editor involved (well under a second): 1. FORMAT it must be an FBX. Unreal imports FBX; .ma/.mb/.blend/.max/.c4d and ...
4443d66abd0acb8c4d1eb81a4a31be2cd6aad034c242211de368c0c9b898eaa4
Python
8,004
250
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import os import re import pickle import random import inspect import argparse import subprocess import torch from torch import...
58d4ed08f94f339eb2f736df392f9f4c37b16c87a8d9bdb88a85d7a7c64befe0
Python
8,005
230
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 8 16:13:47 2021 @author: Hiroshi Yokoyama """ fdir = __file__ from IPython import get_ipython from copy import deepcopy, copy get_ipython().magic('reset -sf') #get_ipython().magic('cls') import os current_path = os.path.dirname(__file__) os.chdi...
cf3688290f54e59442ce18c4a352e22e7a924b70624199326b25cee3fb413505
Python
8,008
195
from Lif_Parameters import * from Lif_Equations import eqs_LIF seed(val) ##################################### # Initialize the neuronal populations - SX ##################################### # ------- Layer 0 ------- # l0 = NeuronGroup(2*n_cells, eqs_LIF, method='exponential_euler', threshold='vm>v_th', reset='vm=v_r'...
7f8abf0eb3cd3605ca29059a2e6ee4eedff0d9a129d9e4a45592f17d210808d4
Python
8,009
215
from Bio.PDB import * import numpy as np from sklearn.neighbors import KDTree """ computeCharges.py: Wrapper function to compute hydrogen bond potential (free electrons/protons) in the surface Pablo Gainza - LPDI STI EPFL 2019 This file is part of MaSIF. Released under an Apache License 2.0 """ from default_config.ch...
617ce0599a61d059789b6f73c45b7722f5b569d16bd9f3f2b46b019fb270f55a
Python
8,011
224
"""Discrimators used in pi-GAN""" import math import torch import torch.nn as nn import sys # sys.path.append('/apdcephfs/share_1330077/starksun/projects/pi-GAN') import curriculums import numpy as np import torch.nn.functional as F from discriminators.sgdiscriminators import * # from sgdiscriminators import * class...
8d845d83124f411159533e6184beda052635b894d0f35f69584d0133b2841a1b
Python
8,011
203
# Copyright 2020-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 agre...
9329a84969840069ca90fc7676ffc2cdb8bcdfb80f40f908e9e3e1f3e0a343c7
Python
8,012
236
from copy import deepcopy import networkx as nx import numpy as np import pandas as pd from graspologic.utils import largest_connected_component from .utils import get_paired_inds, to_pandas_edgelist class MaggotGraph: def __init__(self, g, nodes=None, edges=None): self.g = g # TODO add checks ...
dbfbfc49e9482d8d206f8100081c51cb56aa0e7630d0468a736c83c8c29f06d4
Python
8,012
201
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
35cbc49f3ec89a586b6d9162a3913961075401ccd2f2a3b19ef3d13b66ddabfe
Python
8,015
206
#################################################################################################### # Copyright (c) 2019, 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 softwar...
e177dd7799769e38bf1e0846e10aa683d4dd79d785fa6047e7c0c418cf244af9
Python
8,015
239
################################ ### Module to write the slurm files for the supercomputer ################################## def get_slurmtemplate (jobname,templatefile='../src/io/template.slurm'): with open(templatefile, 'r') as f: slurm_template=[] slurm_template+='#!/bin/bash\n' ...
f2da411e5e32ea5ef983373a173db76eacd2f66285849c03c833c6d7f6a1f32a
Python
8,017
155
import numpy as np from nipype import Workflow, Node, MapNode, IdentityInterface from nipype.interfaces.fsl import maths, BET, MCFLIRT, ExtractROI, FLIRT, Merge, ApplyXFM, ImageMaths, BinaryMaths, ConvertXFM from nipype.interfaces.ants import Registration, ApplyTransforms import nipype.interfaces.utility as util from q...
ba907997ff69687340478eff3da33e1a1abc67fa3da29341d0a66fbaeeb32090
Python
8,019
190
"""Public-API and CLI regressions for empty alignment tracks (#808).""" import subprocess import sys import pytest from conftest import macs3_env from test_Parser_bam_truncation import write_bam from test_Parser_bampe_validation import HEADER, alignment TRACK_PROBE = ''' import numpy as np from MACS3.Signal.Paired...
8bef5101505512aee5231add02085803eac13e5fb87027ef953d7756e32990f2
Python
8,026
193
import unittest import kgcl_schema.grammar.parser as kgcl_parser import yaml from linkml_runtime.dumpers import yaml_dumper from oaklib import get_adapter from oaklib.datamodels.cross_ontology_diff import DiffCategory, RelationalDiff from oaklib.datamodels.vocabulary import HAS_PART, IS_A, PART_OF from oaklib.impleme...
ca5f2fbce706df601dccd6db344282d2cfdec895ccb57c135b64596a240ebf6e
Python
8,028
197
import sys import numpy as np import pandas as pd import networkx as nx import time from tqdm import tqdm sys.path.append(".") from lib import skel from lib import string2list as s2l # Define volume properties xres = yres = 3.58 # in nm/px zres = 40 # Get all pyramidal and interneuron segment IDs # These are the I...
25bf2b982dda9ee24d1635889ca33dec923249a511092094295801f140e88930
Python
8,034
239
#################################################################################################### # Copyright (c) 2016 - 2021, 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 ...
27f2b738c1a4ea778463424b076b7ec1615ef4f13da56ee17e647869cc2d2d18
Python
8,034
250
""" Training script for Burgers equation using the Recurrent Neural Operator (RNO). This script trains an RNO on the 1D time-dependent Burgers equation using a small in-repo dataset. """ import sys from pathlib import Path import torch import wandb import torch.nn as nn from zencfg import make_config_from_cli # Ad...
9546a7f36fd1d103c497e5cc412783ee081368997e67ee24ecefbf4220e63359
Python
8,036
159
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 1 11:58:30 2021 @author: paulmueller This script reads all header files of a patient, looks for corresponing VI files. It creates a new DataFrame which has all VI values but excludes seizures already. The DataFrame has the columns: index(time...
647c7624e21102f24cab2a07126b83809a36d294060d4f8e1d9f5c2f10117a93
Python
8,037
201
# 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...
b51d55c2373597a15997ca9197fb744d865855423fa73d44f5aede0b8e1864bf
Python
8,037
190
# 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...
3d390f010745854208af803b3c7bd2fc8ed3f166f5ab67057edc8aee0a5baa23
Python
8,039
145
from functions import * import numpy as np import matplotlib.pyplot as plt import pickle from itertools import starmap from operator import mul starttime = datetime.now() GiacoPath = "./28nets_rules/Giacomantonio2010.txt" #Averages of Distributions to be plotted as dashed vertical lines def avgOfDistr(distr): #St...
890db4e2345df2ff75651c5d327632270ceba56ddfbf6149ec320a599d3d0634
Python
8,041
206
__author__ = "Jianfeng Sun" __version__ = "v1.0" __copyright__ = "Copyright 2023" __license__ = "GPL v3.0" __email__ = "jianfeng.sunmt@gmail.com" __maintainer__ = "Jianfeng Sun" import warnings import pandas as pd from Bio import BiopythonWarning from Bio.PDB import * from tmkit.base import PDB from tmkit.sequence i...
937f93c1c058e517267e1d606cc22e83ab906844c62b0b46367815a9e121e978
Python
8,041
191
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
88336dcf53279c9ccee2fbf94c529bc24df82cbd84daf9d544f0677ee47c3746
Python
8,042
191
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
a1cbdb92f38e4eff9d051c115a4959994d1e71f312f0cc51e265012273d89ed0
Python
8,042
192
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
aea19e867dd34f7668a0697c26238a06835e206d08ad39e5ed4bfc96f08f38c9
Python
8,042
231
""" This module provides the `MultiFileSampler` class, which uses a FileSampler for each mode of sampling (train, test, validation). The MultiFileSampler is therefore a subclass of Sampler. """ from .sampler import Sampler class MultiFileSampler(Sampler): """ This sampler contains individual file samplers fo...
29448b18264418682b84b5e74a86bec3f4af67e3dbe52b8ebfca19156b70c30a
Python
8,043
207
#!/usr/bin/env python import os import json import math import argparse import pandas as pd from drugex.data.corpus.vocabulary import VocGraph, VocGPT, VocSmiles from drugex.data.datasets import GraphFragDataSet, SmilesFragDataSet from drugex.data.utils import getVocPaths from drugex.logs.utils import enable_file_logg...
3bdb89fc68e047cd9c19cf6456be78e80c4784f7e08631cf4603cd7e52bf638a
Python
8,043
186
# 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...
625240db22187e3640ca4ab11503e2a247d64429c3f44941a1e65969c1cad768
Python
8,043
201
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
18657b084d9df0a18f125d35b15c08a1a3a93e3f77aa59480239bc6fdad05b06
Python
8,046
244
#!/usr/bin/env python3 """ Based on https://github.com/BIDS-Apps/example/blob/aa0d4808974d79c9fbe54d56d3b47bb2cf4e0a0d/run.py """ import argparse import os import os.path as op def get_parser(): parser = argparse.ArgumentParser(description="Run MRIQC on BIDS dataset.") parser.add_argument( "-b", ...
1395871266bd7776e26c1a616ce9e3815e6db249b3d185535f453ad046651357
Python
8,049
262
import numba import numpy as np import pandas as pd from numba import prange @numba.jit(parallel=True, nopython=True) def avg_da(data, time, start, stop): inds = (time >= start) & (time <= stop) tmp = data[:, inds] mu = np.zeros(len(tmp)) for i in prange(len(mu)): mu[i] = np.nanmean(tmp[i]) ...
25f033213ece1c5155c4b057de2ed0085154e13119fb76a7228b13f92d2e4fb5
Python
8,053
223
import sys import pandas as pd import numpy as np import os from itertools import groupby import utils.general_utils as general_utils import utils.plot_utils as plot_utils import utils.plot_setting as plot_setting import utils.math_utils as math_utils import utils.sync_utils as sync_utils import utils.list_twoP_exp a...
affffca7bedab4bfca9b8a005c31afb9448b05a6873ffb636e1a22c552e0744c
Python
8,055
232
from typing import List, Union from pathlib import Path import numpy as np import torch from torch.utils.data import DataLoader from neuralop.data.transforms.data_processors import DataProcessor from .dict_dataset import DictDataset from ..transforms.normalizers import UnitGaussianNormalizer from .ot_datamodule impo...
d964425ede8d6a568d52403d107795d9024a4351772c8c0fe1baba6d96f00f15
Python
8,055
234
__author__ = "Jianfeng Sun" __version__ = "v1.0" __copyright__ = "Copyright 2023" __license__ = "GPL v3.0" __email__ = "jianfeng.sunmt@gmail.com" __maintainer__ = "Jianfeng Sun" from typing import Any, Optional import subprocess import numpy as np import pandas as pd from tmkit.util.Kit import chainid, tactic5, tac...
d68b8b074465a34eb925836870344c7b66117068df5cb55a2dfd3a1aa83f80ae
Python
8,056
215
import logging import numpy as np from utime.sequences.base_sequence import _BaseSequence from psg_utils.errors import NotLoadedError logger = logging.getLogger(__name__) def _assert_comparable_sequencers(sequencers): """ Takes a list of utime.sequencer Sequence objects and compares them for equality on ...
17854df504878c69bd1a2987db41350a2d67eda3b6f2ff7335979a9ecb83102f
Python
8,058
208
import logging import sys import warnings from dataclasses import asdict from functools import partial import chika import numpy as np import pandas as pd from fastai.callback.tracker import SaveModelCallback from imblearn.metrics import geometric_mean_score from sklearn.metrics import accuracy_score, cohen_kappa_scor...
361d91f6e2d836c5f594ac22ff9ef104a662edd278f6f79101eef8dd9b4c578c
Python
8,058
248
import cv2 from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * import numpy as np from datetime import datetime class ReferenceDialog(QDialog): def __init__(self, Parent): QDialog.__init__(self, Parent) self.Form = Parent class SnapshotDialog(QDialog): def __...
a5520d6a093d488b8e72f3a2c6197afdd797090c7c5fc468fdd1ff1472507f46
Python
8,064
209
#!/usr/bin/env python # 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>. """Smooth movement of a camera interpolating collection of keypoints provided...
d9a659c76ec82e7f3e63c5fd711ba18ec1f8c85c7f03efdbbb8a877595f8a479
Python
8,065
192
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
6e8c23e0ca3c3b411033161e450279a197f466542e427cfd8fde815b12a82ca5
Python
8,070
156
feature_filter = [ 6452745, # 1.1.Goal setting (behavior) 6452746, # 1.2 Problem solving #6452747, # 1.3 Goal setting (outcome) 6452748, # 1.4 Action planning #6452749, # 1.5 Review behavior goal(s) #6452750, # 1.6 Discrepancy between current behavior and goal #6452751, # 1.7 Review outcome...
8b599baf1f7aa3fe0573875daa8c5863874f36fc0f7a3aa4faea303f1b7dedeb
Python
8,070
223
""" Basic differential evolution implementation for RACCOON F. Comitani @2019-2022 Based on https://nathanrooy.github.io/posts/2017-08-27/simple-differential-evolution-with-python Storn, R.; Price, K. (1997). "Differential evolution - a simple and efficient heuristic for global optimization over continuous spaces...
9b54f7aea4cdbaac3b142f3953daabf38f653d6f48795b90572800ad0351bf80
Python
8,072
247
# LZW Update May 2017, Feb 12 2017 to match TN00344. # G. Ruffini with Eleni Kroupi / Starlab + Neuroelectrics (2017) # Updated May 2017 with Entropy rate calculators # Part of this code from sources as indicated, but modified to # be used with binary data. # Permission is hereby granted, free of charge, to any pers...
3b78bd5c630d6c1defc3019862f0c0fc3eafbea110cf75d502b6159bd30c9225
Python
8,077
202
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
ad9911bdac3de20cf14213b33d1fe0217a785d545b197bbb844aa2769170a77d
Python
8,078
246
""" Tools for loading data from text files. .. autosummary:: :toctree: generated tsv var """ import csv import os import re from typing import Sequence, Union import numpy as np from .._utils import ui from .._utils.parse import FLOAT_NAN_PATTERN from .. import _data_obj as _data __all__ = ('tsv', 'var') ...
ea94fcecaf8d57fba5a822825494e11b8843ba0dfc743872c83e4c800c9562b4
Python
8,078
200
# 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...
eb409dee10ec5ca87bfdac7a6a42328442f8b38c3371f8501b229e374f87b0f8
Python
8,080
194
import sys import time import os import logging import argparse import pysam import cv2 from multiprocessing import Pool from cnnLSV_combine import combine from cnnLSV_encode import * from cnnLSV_net import pre_sv def parseArgs(argv): parser = argparse.ArgumentParser() parser.add_argument('bam'...
14416d0ea0875003fa4f117beb7c4aa27e2c65239c2df8e1667b214593b3a821
Python
8,082
201
import os import collections from os.path import join import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
274926a74c461b0cdd9e7539b058b8410c543a3ee8438d4ce174873e64f89140
Python
8,085
207
import math import torch from torch.optim.optimizer import Optimizer, required class RAdam(Optimizer): def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0): defaults = dict(lr=lr, betas=betas, eps=eps, weight_decay=weight_decay) self.buffer = [[None, None, None] for in...
2f16ef7538b7a30fae76703b919e4d23ad7c29c539ea352afe3f5d3503cd2059
Python
8,085
182
"""Public text-parser and bounded CLI regressions for #811 / #757 item 14.""" import gzip import subprocess import sys import pytest from conftest import macs3_env HEADER = b'@HD\tVN:1.6\n@SQ\tSN:chr1\tLN:1000000\n@PG\tID:bwa\tPN:bwa\n' SAM = (b'r1\t0\tchr1\t101\t60\t25M\t*\t0\t0\t' + b'A' * 25 + b'\t' + b'...
edd7091cf6781c908d6ff9ed85bd86f4ff3a07bc083046463fa9d5045d68343b
Python
8,085
192
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
88c6e470fa387184cf07419d4577b90eb464744eb9e5bcd3d6a4ed7c658ed13a
Python
8,089
240
""" Extract summary stats about multiple simulations at once """ from tqdm.auto import tqdm as pbar import numpy as np import pandas as pd from tctx.networks.turtle_data import DEFAULT_ACT_BINS import logging def extract_spike_counts_per_ei_type(cells, spikes, wins: pd.DataFrame): """ count number of spikes ...
b7f02b2cc742454b8217027e6315507611e64927d4659673fceaec40319ceb87
Python
8,093
241
# Copyright 2021 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...
c11ddbd9cbc43b6b90d975d4461804fa6000f27b6ae4fd8d6c55be63ff33fe0d
Python
8,096
208
#################################################################################################### # 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 ...
8d6d6807eee01b6edee480406829c48fe6cf506dafa9b447aa19f37a513e53d3
Python
8,097
176
import numpy as np import torch import torch.utils.data as data from utils import coco import utils import json with open("data/preprocess/coco_contexts_hard.json", "r") as read_file: coco_contexts_hard = json.load(read_file) possible_ctx_ids_hard = [ctx['cluster_ids'] for ctx in coco_contexts_hard] with o...
728fab941797378004c46ea3e0c561569a65f5db13a23f3617e5697e4fc17e96
Python
8,099
214
# A modification version from chainercv repository. # (See https://github.com/chainer/chainercv/blob/master/chainercv/evaluations/eval_detection_voc.py) from __future__ import division import os from collections import defaultdict import numpy as np from maskrcnn_benchmark.structures.bounding_box import BoxList from m...
6f099a3e76800c2b433581bf4a571d8b04120f0f0c4a260cb473d0ade89d6a92
Python
8,100
203
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
d4dc4d8c5ec223f587ae66d7b609f921a348d48222eabbb86ac70d99ddcee31d
Python
8,101
195
# Copyright 2021-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 agre...
f47cb4559a487ca5795084b60ae70b34e30273dfa010fa8f62dbb74556665d99
Python
8,104
236
import torch import numpy as np import pickle from scipy.ndimage import gaussian_filter1d from util.datasets import Augmentations FRAME_WIDTH_TOP = 144 FRAME_HEIGHT_TOP = 144 RESIDENT_COLOR = 'lawngreen' INTRUDER_COLOR = 'skyblue' class AllRandomAugmentations(Augmentations): '''Applies a series of random augme...
cebc6987761995b78a3d639a53c2890a37c865f262b794a2ba62db4874f45457
Python
8,106
183
import numpy as np from PIL import Image from torch.utils.data import Dataset from torch.utils.data.sampler import BatchSampler class SiameseMNIST(Dataset): """ Train: For each sample creates randomly a positive or a negative pair Test: Creates fixed pairs for testing """ def __init__(self, mnis...
f67fcb2ef3c7c2911efff10f6fe595600e0c3e913dc47fa278da1f9180375e9d
Python
8,106
225
""" File: data_preprocessor.py Created: 2020/06/29 Last Changed: 2021/08/04 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 Foundation, eith...
d63ef071ab5e984fa824ab17698dfbb028556e6e7425782bee3bdb8a74dd0b6c
Python
8,108
234
import time import warnings import torch import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torch.utils.data from config.config_reader import parse_args, create_parser from dataloader.load_dataloader import load_dataloader from model.unsupervised_model import Model from loss.co...
e7e96e1ae4b4a1c68adb0af7b4e7a10b3e2e5049b421e8d76f7ef0cb2c8a0613
Python
8,109
194
# Copyright 2021-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 agre...
9d4d7a3192173d05feed6a62686ce8dfddaa9ea8edf41bbcc74babe3eb603772
Python
8,113
205
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
709d977b7d66dc7f8476311229124bd819228ca30ec02826e72ef7f30e10e235
Python
8,114
208
#################################################################################################### # 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 ...
b77b20e4c174d3d7d958c678f846e88f07cbc833ba50be6a300d9d9d798096a6
Python
8,120
233
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 27 16:37:21 2021 @author: Hiroshi Yokoyama """ from IPython import get_ipython from copy import deepcopy, copy # get_ipython().magic('reset -sf') #get_ipython().magic('cls') import os current_path = os.path.dirname(__file__) os.chdir(current_path) ...
1c92ff4d8fb96145e2c82b564b88f9d6be5a43a356be3872e6120d7ce7907687
Python
8,122
186
import torch import torch.nn as nn import torch.nn.functional as F import logging from mmdet.models.registry import BACKBONES from .fna_base_backbone import BaseBackbone from .operations import OPS, Conv1_1, conv_dw class MixedOp(nn.Module): def __init__(self, C_in, C_out, stride, dilation, primitives, ...
8267463679a8e2e6d076d8fdd5a11a855daea35e3ddf86ca5ed846d46e72d593
Python
8,122
214
#%% 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...
38bf7877acc43a5c065a3e5790fc937d98ae8fcef3488995a4034e24bbe10669
Python
8,124
186
import pandas as pd import numpy as np import ciso8601 import functions_basic_sak as funsak import inspect import os import pathlib import wget import requests import re from tqdm import tqdm import AIS_parameters pd.set_option('display.max_columns', 20, 'display.width', 1500) fname = os.path.split( ...
7f361d5b7ef5a55059cfd6f104d9040279278348c1919bb808ac6ab23526a86f
Python
8,125
205
from collections import Counter import os import pickle import subprocess import numpy as np import pandas as pd from tqdm import tqdm from sklearn.preprocessing import StandardScaler from sklearn.model_selection import StratifiedKFold, GridSearchCV from sklearn.linear_model import LogisticRegression from sklearn.ensem...
ac72937c52775fec8d6df80257be4b2c0dabd7e549efa8d0fa498b16348cdfa3
Python
8,125
201
import tensorflow.keras.layers as kl import tensorflow.keras.backend as K import tensorflow as tf import neurite as ne from ddmr.utils.constants import IMG_SHAPE, DISP_MAP_SHAPE @tf.keras.utils.register_keras_serializable() class SpatialTransformer(kl.Layer): """ Adapted SpatialTransformer layer taken from V...
ba4abfff71eeb67bfd7404a4be16c043e035b613e3999a85f9582e278f96e89e
Python
8,129
226
import os import numpy as np import pandas as pd import math import random import matplotlib.colors as colors from sklearn.model_selection import train_test_split from sklearn.decomposition import PCA from siVAE.data import data_handler as dh from siVAE.util import reduce_dimensions from siVAE.util im...
156844a911b3b16af44025ebf8868844caffdaeb51048bbeb6776a6ab467ad19
Python
8,130
152
""" DyNeMo: Selecting a Run ======================= Training DyNeMo several times on the same data can give different networks: the modes come out in a different order and, where the data do not constrain the solution well, some networks can be split or combined differently from run to run. A good default is to analys...
14553292957010c7b8c40f19fab170e48dfe33a8e9fa503282a78fd30ac97482
Python
8,131
266
#%% import datetime import time from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from scipy.cluster.hierarchy import fcluster from scipy.cluster.hierarchy import linkage as linkage_cluster from scipy.spatial.distance import squareform from sklearn.me...
14dedf01fec76f851dde8f8ab8b04106676772f38cc2fa15a9b554b54037bd75
Python
8,132
238
# 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...
e44cac99f52eed23d7f53169a6596158f301c2fd5218379f0f397e35ea52adad
Python
8,133
228
# 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...
fede11f8571e6c65bc04045030a1fe08292dbc29483543bbc793958cb603c100
Python
8,134
205
from collections import Counter import os import pickle import subprocess import numpy as np import pandas as pd from tqdm import tqdm from sklearn.preprocessing import StandardScaler from sklearn.model_selection import StratifiedKFold, GridSearchCV from sklearn.linear_model import LogisticRegression from sklearn.ensem...
9a12ff156bfe76649863699083382567819cfd8d538cd476806de8961228b709
Python
8,136
202
import os import collections from os.path import join import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
633c1b5ac21cf7a7badd2fdf54dbb5e368225c6c6caa2059b545c32f0131db35
Python
8,137
198
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
3011c6290e30a2d955cf4e7d9b795b26214576e514c60cfddb86e4e18068346a
Python
8,139
204
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...
17f3f25f1588c920e3191fabc27334ff8177a65c7b4c168204833ec1d48a6766
Python
8,140
195
# Copyright 2020-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 agre...
23d7b5578290260a729f270f6c739bae97340a1d340c92cebb9ad34c66cac8e9
Python
8,140
204
import os from os.path import join import collections import numpy as np import pandas as pd from itertools import chain from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import make_union, Pipeline from sklearn.ensemble import RandomF...