sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
37ffa35cb8dd2c1cc3e38a15693d8d1d214bac7f656a0630dc841b3778dd8850
Python
11,308
302
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 14:28:44 2019 @author: aaussel """ from brian2 import * from scipy import signal from cells.RS_FEF import * from cells.FS_FEF_alt import * from cells.SI_FEF import * from cells.VIP_FEF import * def generate_deepSI_and_gran_layers(theta_phase,N_SI,N_RS_gran,N_SI_gran...
329beffb1af46c33d74b227ee7aa0c5db3528e41530e065d39af8a5772420f31
Python
11,315
302
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 14:28:44 2019 @author: aaussel """ from brian2 import * from scipy import signal from cells.RS_FEF import * from cells.FS_FEF import * from cells.SI_FEF import * from cells.VIP_FEF import * def generate_deepSI_and_gran_layers(theta_phase,N_SI,N_RS_gran,N_SI_gran,t_S...
a2aaa37e01d5736a7ec51e316a94ef75e061d5bc298ca580fd6a99292460f0cb
Python
11,316
296
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from unittest.mock import patch from ax.core.base_trial import BaseTrial, TrialStatus from ax.core.mu...
edb40d9313c1baa6252b6be6c2ccdff0d187b40de113662f840613d5c22ef2d9
Python
11,318
364
import subprocess import numpy as np import pandas as pd import pysam from ALLCools.utilities import parse_chrom_size, reverse_complement from ._doc import * def mode_mc_cov(table, mc, cov): mc = table[mc].astype(int) cov = table[cov].astype(int) frac = np.round(mc / cov).astype(int) values = pd.Da...
4d98551c210223568f25eaf41f64f96853c362df2be2eb859ce7ddff1018e6fd
Python
11,319
309
# import libraries import sys sys.path.append('..') import os import torch import torch.nn as nn import numpy as np import torchvision from torchvision import transforms import matplotlib.pyplot as plt import time import argparse import copy import json from torch.utils.data import DataLoader from utils.data_utils imp...
fd0f49ef8d78fce73938ec12c651d9b605bcbcb6c7e9acb4f7e4cccab2aae3cd
Python
11,322
311
'''Compute total motion energy from greyscale videos. ''' import numpy as np from moten.utils import (iterator_func, pointwise_square, ) # Make tqdm optional with_tqdm = True try: from tqdm import tqdm except ImportError: with_tqdm = False def process_motion_...
4e49576b8fdf063aed55363ce2800444f0c322a5888baad6fb12b1d79f978f7e
Python
11,327
309
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 14:28:44 2019 @author: aaussel """ from brian2 import * from scipy import signal from cells.RS_FEF import * from cells.FS_FEF import * from cells.SI_FEF import * from cells.VIP_FEF_alte import * def generate_deepSI_and_gran_layers(theta_phase,N_SI,N_RS_gran,N_SI_gra...
6e890c9d9440f92e29993a39098e5ee4f91d66f1a131b7a72bf7f50d78ef59a6
Python
11,331
311
# NICE # Copyright (C) 2017 - Authors of NICE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero 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 ...
f11fa1dd183e09db452dd7a3ee6b80a695eef5298c918a70b8b762fa034635d4
Python
11,342
247
"""Utility functions to retrieve cell counts from the scientific literature. Lexicon: AIBS stands for Allen Institute for Brain Science https://alleninstitute.org/what-we-do/brain-science/ """ from typing import TYPE_CHECKING, Dict, Union import numpy as np import pandas as pd if TYPE_CHECKING: # pragme: no co...
32a9983d7cb77da0e89954d9a8dd822b9ef4c3abe97f27f779ebeaf55873969f
Python
11,343
255
from __future__ import print_function import os import re import copy import random import datetime import timeit import pdb import PIL import numpy as np import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from sklearn.model_selection import train_test_split from sklearn.metrics import roc_...
56fdf3496f3d8842cdfbc28d6d47259a484e7b52f329d17b53fc37e27628bc8a
Python
11,343
344
import pytest import networkx as nx class TestLoadCentrality: @classmethod def setup_class(cls): G = nx.Graph() G.add_edge(0, 1, weight=3) G.add_edge(0, 2, weight=2) G.add_edge(0, 3, weight=6) G.add_edge(0, 4, weight=4) G.add_edge(1, 3, weight=5) G.add_...
1149cc9cf0548b0344a9c2530eddfce2c308a39e851c71e97d0f36cce7e89572
Python
11,347
270
"""Calculate the confidence intervals (through bootstrap tests) and significance (through sign permutation tests) of the zero-shot identification analysis results, and of the differences between the results and the noise ceiling. Furthermore, fit a power-law function to the identification results to extrapolate the ima...
8aae1feb542ee2f9b8b25ffd97061f7a4111e6f83dd4e26133a641182d070e58
Python
11,347
303
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 14:28:44 2019 @author: aaussel """ from brian2 import * from scipy import signal from cells.RS_FEF import * from cells.FS_FEF import * from cells.SI_FEF import * from cells.VIP_FEF import * def generate_deepSI_and_gran_layers(theta_phase,N_SI,N_RS_gran,N_SI_gran,f_m...
cac2fefd3c5c26396f550ba94388d832c683e6112db2b3ecb45d751096741f8e
Python
11,347
302
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 14:28:44 2019 @author: aaussel """ from brian2 import * from scipy import signal from cells.RS_FEF import * from cells.FS_FEF import * from cells.SI_FEF import * from cells.VIP_FEF_altd import * def generate_deepSI_and_gran_layers(theta_phase,N_SI,N_RS_gran,N_SI_gra...
a9dd52ad7eb89157658d803a4e49cde662b25e75c7bcd4aa557a788d61bf54dc
Python
11,352
294
""" The 'nodes' module contains methods to construct TF subgraphs computing the 1D or 2D DWT or IDWT. Intended to be used if you need a DWT in your own TF graph. """ import tensorflow as tf from tensorflow.keras.layers import * def cyclic_conv1d_alt(input_node, filter_, mode): """ Alternative cyclic c...
f8a213e26d6ba1bb52a22ee3aee28397b35f3090f171844a87b7a44d5ded8448
Python
11,352
210
#!/usr/bin/env python # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # import cellranger.analysis.io as analysis_io import cellranger.analysis.constants as analysis_constants import cellranger.h5_constants as h5_constants import cellranger.io as cr_io import cellranger.analysis.stats as analysis_stats ...
b580df4c02e4c36bf4154fd9637ef64ff46ff0dd134cdb3f9b6fb57b9973c2e1
Python
11,364
384
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jun 5 13:55:26 2017 @author: virati Stimulation artifact plotting and outlining DISSERTATION FINAL """ #import Sim_Sig as SiSi import numpy as np #import prettyplotlib as ppl import matplotlib.pyplot as plt import matplotlib import scipy.signal as sig ...
68f6a6d97e972f05d9a881cebe6804e44255f7e14a8aa0f5428d014581d0dd48
Python
11,366
255
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from __future__ import annotations from typing import TYPE_CHECKING from ax.adapter.data_utils impor...
d919facc3ee4b65b0d604da600279516fb0a655856fb1b3f3162af5f101eec43
Python
11,373
242
# coding: utf-8 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"...
c8c3c4f381c5a7d21346e6471801cf1865417a6f2f4215d9eb6e90384cddf700
Python
11,376
267
# Copyright (c) MONAI Consortium # 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 in writing, so...
2753a1f9faa7970ea86db993c072d5ee5c5d1b1ec1daa87112fb50459dcc162e
Python
11,377
314
'''Compute total motion energy from greyscale videos. ''' import numpy as np import moten from moten.utils import (iterator_func, pointwise_square, ) # Make tqdm optional with_tqdm = True try: from tqdm import tqdm except ImportError: with_tqdm = False def pr...
6cc504003cac24d53bae75cafe4e0eaa935718c585904e9bdc98ea1542dfd065
Python
11,378
339
"""Backing implementation for InstallRequirement's various constructors The idea here is that these formed a major chunk of InstallRequirement's size so, moving them and support code dedicated to them outside of that class helps creates for better understandability for the rest of the code. These are meant to be used...
4f030f96273ae6c9d5f7fcb270d58007859a4fe7871d84b335754cccb80539b3
Python
11,382
306
""" Closeness centrality measures. """ import functools from collections import defaultdict import networkx as nx from networkx.utils.decorators import not_implemented_for __all__ = ["closeness_centrality", "incremental_closeness_centrality"] @nx._dispatchable(edge_attrs="distance") def closeness_centrality(G, u=N...
6cd7c8588db1c2c912b3b49a7db8fd11890d00874dce21041acd60d9d407c078
Python
11,394
333
""" Transcript of a REPL session and the ``.transcript`` command. Every entry of the session, a statement or a dot-command, is recorded from the start with the plain text of the output it produced, so that ``.transcript PATH`` can write the session as a Markdown file and ``.transcript PATH --inputs`` the inputs that r...
88799f5088002a08bbf64842d0b0d2ecfdd753fbd1d323da43f7e32a31544715
Python
11,399
295
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from collections.abc import Callable from typing import Any, final from ax.adapter.base import Adapter from ax.analysis.anal...
3f21ff6c17192efdbb81faaa6995be8f753f99960798c3563d713399fe4ccd4e
Python
11,401
356
""" Miscellaneous Utils Nicholas Turner <nturner@cs.princeton.edu>, 2017 """ import importlib import datetime import shutil import types import sys import os import re import torch from torch.utils.data import DataLoader import tensorboardX import numpy as np import h5py def make_required_dirs(args): """Sets up...
581a1a10de6d28cbb35634da1a29f051cf6639b90a5837fced7c0ad62d19acbe
Python
11,404
267
#### All original code is copyright of Graham King, Trinity College Institute of Neuroscience. ## Code to create figures/plots of connectome stability (within participant spearman correlation across the two sessions) ## Last edited Oct 2022 import pandas as pd import numpy as np import glob import os import nilearn.s...
3473f1adf7f8e655150ac2bb5dec874c79dc56fc11fc6e169881b78f27b20445
Python
11,413
318
# -*- coding: utf-8 -*- """ Test data """ # Imports import pandas as pd from edbo.feature_utils import build_experiment_index # Build data sets from indices def aryl_amination(aryl_halide='ohe', additive='ohe', base='ohe', ligand='ohe', subset=1): """ Load aryl amination data with different features. ""...
4d0745bf71562707fdce732d284eb62f08c044053238c3768fdcfabbcfe7d734
Python
11,415
290
import importlib import os import threading from functools import partial from importlib import metadata from typing import Callable, NamedTuple, Optional import torch from packaging.version import InvalidVersion, Version from spikingjelly.logger import logger from .native_loader import _check_native_device _NEURO...
487f8efc4c8ee4498907b8ab8b3bf211645d8b7657fca7afe73ea3d1408dbf43
Python
11,421
292
""" Copyright © 2025 Howard Hughes Medical Institute, Authored by Carsen Stringer and Marius Pachitariu. """ import torch from segment_anything import sam_model_registry from torch import nn import torch.nn.functional as F from pathlib import Path torch.backends.cuda.matmul.allow_tf32 = True import logging vit_logge...
8fb62aefe902e53d6d48d00ee8758af6ae67e4162777e8c66cdeb5cc1cba5710
Python
11,435
306
""" Object Store plugin for the Onedata Service. """ import logging import os from datetime import datetime try: from onedatafilerestclient import OnedataFileRESTClient from onedatafilerestclient.errors import ( OnedataError, OnedataRESTError, ) except ImportError: OnedataFileRESTClien...
751d21aee7968560ae5ba35958f55b210ab0deb5aebf89c1d6d40d0756c514c3
Python
11,438
310
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from warnings import catch_warnings import numpy as np from ax.exceptions.core import UnsupportedErr...
96ccdfd09d3933f1abfd2f3315e08965b88ffe21866156457c85aaac13719814
Python
11,451
286
import typing import errr import numpy as np from .. import config from ..config import refs, types from ..config._attrs import cfglist from ..exceptions import ( IndicatorError, LayoutError, PlacementError, PlacementRelationError, ) from ..morphologies.selector import MorphologySelector if typing.TY...
93dfdc8901673c93aca159b454ba11de61e4157b2f80546fb19b8b608ab5b86a
Python
11,457
402
#!/usr/bin/env python # # Copyright (c) 2015 10X Genomics, Inc. All rights reserved. # import collections import os from cellranger.library_constants import GENE_EXPRESSION_LIBRARY_TYPE Interval = collections.namedtuple('Interval', ['chrom', 'start', 'end', 'length', 'strand']) Transcript = collections.namedtuple('Tra...
1bfce640b1b4dfdd15413ee90bdff3534954f2c53850d22cf387ab46102cdce7
Python
11,461
360
"""Helper functions and constants for GCP Batch runner.""" import logging import re from humanfriendly import parse_timespan log = logging.getLogger(__name__) # Default values for GCP Batch runner configuration DEFAULT_NFS_MOUNT_PATH = "/mnt/nfs" DEFAULT_NFS_PATH = "/" DEFAULT_MEMORY_MIB = 2048 DEFAULT_CPU_MILLI = ...
f2933767bc1c7eaa9b645d7759129293d94be0f2b0e949b55d4bd325fd2dadc7
Python
11,470
259
import tensorflow as tf import os import glob import json import pandas as pd from collections import namedtuple DataloaderParameters = namedtuple('DataloaderParameters', ('db_path_config', 'records_path', 'db_seq_len', 'seq_len', 'augment' )) class DataLoaderGeneric(): """Superclass for other dataset dataloaders...
c71124268999ce7b3df9064a04e6b432843972d36892e4446f542a0f4d04734c
Python
11,472
470
# -*- coding: utf-8 -*- """ Source ====== This module provides the base class for data sources and sinks. """ __author__ = 'Christoph Kirst <christoph.kirst.ck@gmail.com>' __license__ = 'GPLv3 - GNU General Pulic License v3 (see LICENSE.txt)' __copyright__ = 'Copyright © 2020 by Christoph Kirst' __webpage__ = '...
cb2c8f29c7b7d4de51aa6eb7e347a2db414dd1d0ae5c604a13cc85e0bdfc6af2
Python
11,478
307
#!/usr/bin/env python """ Scale Pyramid for Neuroglancer using Dask This script builds a multi-resolution pyramid from a raw Zarr dataset. It creates new downscaled datasets (s0, s1, s2, …) in the same container so that the data can be efficiently viewed with neuroglancer. Behavior is identical to the origina...
cc6e133b5f7afab2d4404be74635dc185c0a1c587c4cbea843ac8d557fcbb560
Python
11,480
329
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from cogdl.layers import SELayer from .. import BaseModel from cogdl.layers import MLP, GATLayer, GINLayer from cogdl.utils import batch_sum_pooling, batch_mean_pooling, batch_max_pooling from cogdl.layers import Set2Set class App...
212365cd943bbda3967c8a2368b40e24e060fe0a7499dbce7c3116b394ab22ab
Python
11,481
300
import json from typing import ( Any, cast, Dict, List, Optional, Sequence, Union, ) from typing_extensions import get_args from galaxy.tool_util_models.parameter_validators import ( AnyValidatorModel, DatasetMetadataEqualParameterValidatorModel, DatasetMetadataInDataTableParam...
62c38744977c21068708aaccf6924e1274f2ad45f36d51e756575065a3b7316d
Python
11,484
361
""" This module provides a "Python implementation" of the camcoil program (originally written in C) to estimate the random coil chemical shift values from a sequence (string) of amino-acids. The work is described in detail at: 1. Alfonso De Simone, Andrea Cavalli, Shang-Te Danny Hsu, Wim Vranken and Michele Vend...
9bb504905f91b1f6451f55f2e8fb0129e81d95168f14a37ca045227566284af1
Python
11,490
379
from __future__ import annotations from collections.abc import Sequence from typing import Literal import numpy as np import pandas as pd from anndata import AnnData from numba import njit from scanpy import logging as logg from scipy.sparse import csc_matrix, csr_matrix, issparse, isspmatrix_csr, spmatrix from sklea...
4977a9c3c6fe0d59d2b53b2cec77dab0ed98bfcca3d8d8d449609eeb200c62a1
Python
11,492
376
"""Inferior and superior ranks, provided by the user, are passed to the kernel function to provide a softer version of the rank filters. E.g. ``autolevel_percentile`` will stretch image levels between percentile [p0, p1] instead of using [min, max]. It means that isolated bright or dark pixels will not produce halos. ...
30cfe2ae64918a0eb13f1297254e93031825a48f82c9024a678e87b29e60cc49
Python
11,494
250
import torch import torch.nn as nn import rdkit.Chem as Chem import torch.nn.functional as F from MolRep.Explainer.Attribution.utils.fuseprop.nnutils import * from MolRep.Explainer.Attribution.utils.fuseprop.encoder import GraphEncoder from MolRep.Explainer.Attribution.utils.fuseprop.mol_graph import MolGraph from MolR...
2684d2fd963bbb87411c4b6d0f9e564f5a43e3b15cbc42c1133c3eb89422aafe
Python
11,496
349
import pytest import networkx as nx from networkx.utils import edges_equal, nodes_equal # Note: SubGraph views are not tested here. They have their own testing file class TestReverseView: def setup_method(self): self.G = nx.path_graph(9, create_using=nx.DiGraph()) self.rv = nx.reverse_view(self....
1a73fa832d74d14251be25009c0be78d99784fa7504068847756334432d3eb33
Python
11,497
295
#!/usr/bin/env python # # Copyright (c) 2015 10X Genomics, Inc. All rights reserved. # import subprocess import re import os import martian import xml.etree.ElementTree as etree import tenkit.constants as tk_constants BCL2FASTQ_V1 = "OLD" BCL2FASTQ_V2 = "NEW" def get_bcl2fastq_v1(hostname): try: subproces...
b144a045c0e80535ff5694ce11c5522f085e6009b362a475da2e49ac6adb5208
Python
11,502
315
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from ax.core.parameter import ChoiceParameter, ParameterType, RangeParameter from ax.core.parameter_co...
c7c9210afe9c3070dfe7a0e0ba8e46283f0d4df5afa117c1f65ef58bdcfcd147
Python
11,506
298
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from typing import final import pandas as pd from ax.adapter.base import Adapter from ax.analysis.analysis import Analysis f...
5459c1b416a46c3480384a2ad12031ce28a5aa4d715673a3bbdda01f09224490
Python
11,508
339
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
f851bb99daf4ea20991b293b1db59998ebcbe351831da0d347c7a94fff9ecbdc
Python
11,508
395
"""Strongly connected components.""" import networkx as nx from networkx.utils.decorators import not_implemented_for __all__ = [ "number_strongly_connected_components", "strongly_connected_components", "is_strongly_connected", "kosaraju_strongly_connected_components", "condensation", ] @not_impl...
ebf32b2a71bca89648e2046e5f7019156f56f16dc3f38661fa5acc88a5e27cad
Python
11,509
251
import logging import os from typing import ( Any, Optional, ) from sqlalchemy import false from galaxy import util from galaxy.model.tool_shed_install import ToolShedRepository from galaxy.tool_shed.galaxy_install.client import InstallationTarget from galaxy.tool_shed.galaxy_install.tools import tool_panel_m...
5b466eab6f41faf90dc73888a20d6c89faeca304d2a25eaa9893a28102c3a882
Python
11,511
273
#!/usr/bin/env python # # Copyright (c) 2015 10X Genomics, Inc. All rights reserved. # import os import socket import tenkit.log_subprocess as tk_subproc import tenkit.preflight as tk_preflight import cellranger.chemistry as cr_chem import cellranger.constants as cr_constants import cellranger.library_constants as lib_...
246ea55a18a671cc13429306b4b1a4e046bed33d013e69744a593111939ac19a
Python
11,513
288
# Requriments - transformers, tokenizers # Right now, the Smiles Tokenizer uses an exiesting vocab file from rxnfp that is fairly comprehensive and from the USPTO dataset. # The vocab may be expanded in the near future # Code from: https://github.com/deepchem/deepchem import collections import os import re import pkg...
2cb772040391e9e830f25fa8303fe38421d2452a8640dbed97bf40562af19bf9
Python
11,514
375
import re import math from functools import reduce class CData: def __init__(self, name): self.name = name self.timelist = [] self.deadlist = {} # dead objects self.censoredlist = {} # censored objects self.survpercent = [] self.survpercent_CI95 = [] ...
00373b1d4b91e739e51d8642b171acb31385597da4008a1cdb7a07583a09e8da
Python
11,517
245
# rmf 7.2.2020, last modified 4.14.2021 # cleaned up 3.1.2022 import sys, re import svgwrite as svg import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plot import matplotlib._color_data as mcd # FUNCTION: plots promoter and first intron, with any binding sites, for all transcripts in the group o...
ab410288372a5c5c00d680d4c44bf4bba3e044aa3e0bfd959ccf83ddd232ea7f
Python
11,517
323
# %% import import sys, os, platform from src.pipelines import ComputeMinimumControlEnergy, Regression from src.utils import rank_int, get_exact_p, get_null_p, get_p_val_string from src.imaging_derivs import DataMatrix from src.plotting import my_null_plot from bct.algorithms.physical_connectivity import density_und f...
c32973b940ee8815c916a1c0d315d1a2e7492133a25806db331e57334f4bb90e
Python
11,529
216
from __future__ import division import os import argparse import glob import function as func import operator import fileinput import pdb import sys import time import itertools from datetime import datetime import numpy as np import pandas as pd import matplotlib.pyplot as plt from windows import * from normalization...
c3008803419f00259e3c841c50f60b939a01b1cb9ec93b76287ee7aaaaa131e8
Python
11,535
215
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @title: Plating.py @author: chrisarcadia @description: methods to assist in plate (container) preparation @created: Thu May 31 10:00:03 2018 """ import numpy import scipy.special from chemcpupy import Containers # data related methods def make_pe...
cf37d985ef1931ffdb51864d5b58c2ee1ad7705e0f37dab349e5b13850c19a5d
Python
11,536
408
# -*- coding: utf-8 -*- """Docking_GD_Parallel.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1P4GssDPNRBrGwGPIuuTlIdHmC0J2TjxJ """ import os import sys import string from pyrosetta import * from rosetta import * from rosetta.pro...
e10441f263073f3c73c27d01fe52398ad0c5ca0277940655889ff3a6ce6e6341
Python
11,537
287
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from __future__ import annotations import logging from collections.abc import Callable from typing im...
27d91b21a502dabb9a55365ea4ea3bc925b91317e115cbfbf18a049b22744a72
Python
11,542
281
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
bb1cbd350beb0d0473f47763ab3d30f485ab43063be5b948ac66e36376cc479f
Python
11,547
290
"""Tests for mibitracker.helpers. This tests for the retry and status checking utilities only. Specific helper functions that make use of the MIBItracker API and can be tested by running a local instance of the MIBItracker to ensure proper integration. A set of examples can be found in mibitracker/testing/MibiRequests...
837d121e93579a280de09b9e73bd365261995638dc535d7e0d9d2186b2c262ca
Python
11,568
283
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
8fad97c7ec1cf269798831d7a0afd34a1acd32458e2189f14f38bbc9abf89725
Python
11,570
310
import datetime import getpass import json import os import collections import click from pkg_resources import resource_stream, resource_filename import shutil def update_config_file(config_file=None): """Updates an existing configuration file with any new fields. Does not modify existing fields.""" new_confi...
9386e5594f09fc01e0378302bcc1e8c053fa0654d9d66f7741bd735aafaad174
Python
11,573
390
"""Figure 1 plot - paradigm figure and behavior.""" # %% # Imports import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from matplotlib.lines import Line2D from mpl_toolkits.axes_grid1.inset_locator import inset_axes from config import ANALYSIS_DIR_LOCAL, STREAMS from utils imp...
2bd3693c634661dd513b4fabaee996055c56fb084773795d94eeed82291769c8
Python
11,575
310
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
e933de654fb5e77b7d9b821fd1721853984ab5b9134a5a1d35286b40d6248df2
Python
11,576
319
import functools import logging import os from typing import ( TYPE_CHECKING, Union, ) from galaxy import model from galaxy.jobs.runners import ( AsynchronousJobRunner, AsynchronousJobState, ) from galaxy.util import unicodify if TYPE_CHECKING: from galaxy.jobs import MinimalJobWrapper CHRONOS_IM...
f4ec8d41f9cc28da848e2a929d092b544c7e28b45938cf2c8e9414d84c0df8ea
Python
11,585
330
from __future__ import annotations from spikingjelly.logger import logger from typing import Optional from weakref import ReferenceType, WeakKeyDictionary, ref import torch.nn as nn from .. import base __all__ = [ "collect_reset_modules", "detach_net", "invalidate_reset_cache", "reset_collected_mod...
9241513a1def3e078509fe0a6dadedee18fc180114b81b97dff634d26d2b54e9
Python
11,607
358
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 14:28:44 2019 @author: aaussel """ from brian2 import * from scipy import signal from cells.RS_LIP import * from cells.FS_LIP import * from cells.SI_LIP import * from cells.IB_soma_LIP import * from cells.IB_axon_LIP import * from cells.IB_apical_dendrite_LIP import *...
d2127abc042691e29d2aea30a799f98a104a3af9d2adc86152e1db5d37fcd949
Python
11,610
406
"""Functions concerning tournament graphs. A `tournament graph`_ is a complete oriented graph. In other words, it is a directed graph in which there is exactly one directed edge joining each pair of distinct nodes. For each function in this module that accepts a graph as input, you must provide a tournament graph. The...
63d64584a6193593f0e81b7ae563395c94f7c775a3692494198866f6c5bb625d
Python
11,611
327
import os import json import subprocess as sp from argparse import ArgumentParser from contextlib import ExitStack from pathlib import Path from typing import TYPE_CHECKING, Any from learnMSA import Configuration if TYPE_CHECKING: from learnMSA.util import EmbeddingDataset, SequenceDataset DEFAULT_FALLBACK_MEMO...
11bbb0077348814f0fd7bb1eb7f33aafcb9cc458e3407774403c75810dbeb725
Python
11,617
358
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 14:28:44 2019 @author: aaussel """ from brian2 import * from scipy import signal from cells.RS_LIP_altd import * from cells.FS_LIP_altd import * from cells.SI_LIP import * from cells.IB_soma_LIP import * from cells.IB_axon_LIP import * from cells.IB_apical_dendrite_LI...
9ace2ebc6e5154dea333d76683fba0c268712561ebfe4667feecc4365815df54
Python
11,621
282
from __future__ import annotations from collections.abc import Iterator from functools import reduce from itertools import product from typing import Any, cast import numpy as np import pandas as pd from anndata import AnnData from scanpy import logging as logg from sklearn.metrics import DistanceMetric from sklearn....
2101794fdfbc24d6dfabe89d2f1beee0af4f31234d8f3a6da56aa487dc521fa9
Python
11,632
277
# Copyright (C) 2021-23 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ import numpy as np import typing as ty from lava.magma.core.learning.constants import GradedSpikeCfg from lava.magma.core.learning.learning_rule import LoihiLearningRule from lava.magma.core.process.con...
7b7ff9e219063b780d6c9cd084e54582ef065b0a86628c11576120ba78ac1478
Python
11,632
350
# -*- coding: utf-8 -*- """ Created on Wed Dec 4 11:35:36 2019 @author: aaussel """ from cells.RE_mdPul import * from cells.TC_mdPul import * #from cells.HTC_mdPul import * from cells.HTC_buffer_mdPul_Destxhe_tests import * from scipy import signal prefs.codegen.target = 'numpy' defaultclock.dt = 0.01*ms runtime...
ad0db999c765427fa9f8db4e7a4757f99e3c357013a0da239f2f5be5bc7318fa
Python
11,632
355
import pathlib import numpy as np from scipy import linalg from sklearn.utils.extmath import safe_sparse_dot from sklearn.linear_model import LinearRegression _DEFAULT_ALPHAS = np.logspace(-1, 3, 9) def _preprocess(X, Y, feat_penalty=None): new_X = np.empty((X.shape[0], X.shape[1] + 1), dtype=X.dtype) ne...
7125b51aa7511b0a9fd6e21374e74704b2691221e74ce43df9663b94fe07fb17
Python
11,634
303
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from copy import deepcopy from ax.adapter.base import DataLoaderConfig from ax.adapter.data_utils imp...
e5fdeb18423db0da26072f9faace9af21fb4f64a477def1dcbc33e148bb54ab2
Python
11,644
240
"""aggregate_matched_control.py - collapses the per-subject matched-registration control into a per-ROI cohort comparison of V1 orientation divergence, and reports the Results 3.6 correlation between that divergence and the between-model field difference. Trap: baseline tensor_divergence.csv (08_tensor_divergence.py) ...
9992d1a92f3bdc44f4a038877345fa88e0f983f7d46fa52de2a9bd004a5273e4
Python
11,651
426
# Original author: D. Eppstein, UC Irvine, August 12, 2003. # The original code at http://www.ics.uci.edu/~eppstein/PADS/ is public domain. """Functions for reading and writing graphs in the *graph6* format. The *graph6* file format is suitable for small graphs or large dense graphs. For large sparse graphs, use the *...
a983ceae26be5b6b0113b58078c720eb03b061c9dbc6a080beaf6fd6a1cf2aea
Python
11,651
354
# -*- coding: utf-8 -*- # Imports import random import pandas as pd import numpy as np from pyclustering.cluster.kmedoids import kmedoids from pyclustering.cluster import cluster_visualizer from pyclustering.utils.metric import distance_metric, type_metric from sklearn.cluster import KMeans from sklearn.metrics impor...
fc1f33c0284b32397d1ad7bc567c430b2b712ec8e6d9b77899bc69bd6ef685ac
Python
11,661
330
""" Mixin blender module for the scaffold object. When scaffold.for_blender() is called all the public callable objects of this module are bound to the instance. """ import bpy as _bpy, numpy as _np from .. import blender as _main def create_network(self, scene, name): """ Creates the root collectio...
793c68366e38b306e98528455391b0f440ebb49f32f3a02980d08c3512ef96e8
Python
11,663
305
""" Copyright © 2025 Howard Hughes Medical Institute, Authored by Carsen Stringer , Michael Rariden and Marius Pachitariu. """ import logging import numpy as np from tqdm import trange from . import transforms, utils import torch TORCH_ENABLED = True core_logger = logging.getLogger(__name__) tqdm_out = utils.TqdmToL...
b937f954f3f3bbc44b961de00fca6ec26aa0f2dc1c62dbe14558eb95fc2f5989
Python
11,669
357
import pytest import sklearn.utils.estimator_checks from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler from sklearn.exceptions import NotFittedError from sklearn.base import clone from himalaya.backend import set_backend from himalaya.backend import ALL_BACKENDS from himalaya.u...
caa11e4b5d9d01d58908bedad8e6a1618aa535186ef2d7acbdfabab3790904cb
Python
11,675
292
from jinja2 import Environment, FileSystemLoader, select_autoescape from yapf.yapflib.yapf_api import FormatFile import requests from unidecode import unidecode from pathlib import Path from datetime import date, datetime import getpass import os import sys import re from pylint import lint """ Generates SNIRF interf...
c9361438bf165a29ea7086b593f3a118327342aab1a481b06ac0d169978d0067
Python
11,682
290
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from copy import deepcopy from math import sqrt import numpy as np from ax.adapter.base import DataLo...
86a9ae2d86219a61e9832d36337ee6ffbfcf3317a0d7d2004161e96af6a5d352
Python
11,683
377
# -*- coding: utf-8 -*- """ FilterKernel ============= Implementation of various volumetric filter kernels. .. _FilterTypes: Filter Type ----------- Filter types defined by the ``ftype`` key include: =============== ===================================== Type Descrition =============== ================...
619eda95f0032ca8cbc04f9a8d9c6bb1450d509ca3fc2e41aa4c412d5179606a
Python
11,684
331
import os import uuid from collections.abc import Callable from functools import ( lru_cache, wraps, ) from multiprocessing import get_context from threading import ( local, Lock, ) from typing import ( Any, ) import pebble from celery import ( Celery, shared_task, Task, ) from celery.s...
d6bf5d395487b22eedf77ab66a7b892a3649a32d4ab6af2b8a8bc327cbf25ee6
Python
11,684
318
import typing from collections import deque from typing import Iterable, Optional, Union import errr from ._util import get_location_name from .definitions import CableType, ModelDefinition from .exceptions import ConstructionError, FrozenError, ModelDefinitionError if typing.TYPE_CHECKING: from build...
320812ab187de73a7eb8962da7b1e81918a8be991a42fd6ff1f129013ab426cd
Python
11,685
352
import sys sys.path.append('../') import pyedflib import utils from data.data_utils import * from constants import INCLUDED_CHANNELS, FREQUENCY from utils import StandardScaler from torch.utils.data import Dataset, DataLoader import torch import math import h5py import numpy as np import os import pickle import scipy i...
4f1368455092014a6fa4eed05cded966378094f1f06bee2a5bc7d2ed926d552d
Python
11,689
362
from collections.abc import Iterable, Mapping, MutableMapping, MutableSet, Set from typing import AbstractSet, Tuple from nl_expr.expression_walker import ReplaceExpressionsByValues from nl_expr.expressions import Constant, FunctionApplication from nl_expr.type_system import Unknown, get_args from ..utils.relational_a...
cf26a8973b2d45aa877266006792e4f6d2d13b7e1fb2d98e1f332fbd3cb06e2c
Python
11,689
350
from sklearn.preprocessing import StandardScaler import math import pandas as pd import numpy as np import re import pyBigWig import pickle import multiprocessing as mp import time import os import sys from keras.models import load_model class DNArepresent: def __init__(self, sequence, chrom, start, stop, strand...
ac0314d6b755b9ae6f479659b733d632a50464a147de445a9d03d57722394a4b
Python
11,691
529
#!/usr/bin/env python # coding: utf-8 # # Data analysis for our study on the transparency and open science standards in the policies of medical and health science journals # The protocol and details of our study is openly availble via the OSF [here](https://osf.io/h2xud/). # In[1]: # import libraries required for ...
b3d642806c57a9d68b2961b142483caefa53d8b3a5230b34ee972bb8d73a3755
Python
11,695
266
# Copyright (c) MONAI Consortium # 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 in writing, so...
f0faaf927bf3346e5d1d04127cad956d17c1a19cada1949d9b733dddcbdd3cf6
Python
11,697
351
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from __future__ import annotations from collections.abc import Callable, Generator from contextlib im...
59ce3d70191c532b014784d9d9b8ef78868f3b5e4646c075af108389528c2c42
Python
11,700
278
# -*- coding: utf-8 -*- """ Created on Mon Jan 10 23:22:40 2022 @author: Danny """ import pandas as pd import numpy as np from datetime import datetime from scipy.stats import mannwhitneyu def days_between(d1, d2): d1 = datetime.strptime(d1, "%Y-%m-%d") d2 = datetime.strptime(d2, "%Y-%m-%d") ...
db4555860b3f7b0844c975f419b9b721c5bf462ac1cae20c2c2c9bdf588c3b10
Python
11,701
348
# -*- coding: utf-8 -*- """ Implementation of various volumetric filter kernels .. _FilterTypes: Filter Type ----------- Filter types defined by the ``ftype`` key include: =============== ===================================== Type Descrition =============== ===================================== ``mean`...
ea7603f17ef40de1f5c67a38c44e36262362490cc159046b5456b2c84e04edb3
Python
11,707
261
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon August 6 2018 @author: chrisarcadia @description: script to review a library platesheet and to optionally generate a mass list and Andrew recipe for that library """ # Import python libraries import chemcpupy import csv i...
f461dc5f24d4935e9cdb5176441c6b30a2cf756f660b18f1fa3e9786e2bd90e5
Python
11,710
364
""" This module provides a "Python implementation" of the camcoil program (originally written in C) to estimate the random coil chemical shift values from a sequence (string) of amino-acids. The work is described in detail at: 1. Alfonso De Simone, Andrea Cavalli, Shang-Te Danny Hsu, Wim Vranken and Michele Vend...
777905371919632ff35dc9c73267076f1ec4ab2544c81da4fbfd41cddcc76c90
Python
11,720
321
"""Short Term Storage service for Galaxy. This service is used to store files for a short period of time (e.g. a few minutes, hours or days) and then serve them to the client. This is useful for large files that take a long time to generate and are not worth storing permanently. """ # TODO: Move it to its own package...
f3501f88a324342fab45c514580ae1760f3940e58382eb52d33194f9a9fe8e8d
Python
11,720
287
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.""" import logging from datetime import datetime from core.current_request import CurrentContext from core.permissions import AllPermissions from core...