sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
56ec33646841eba7c9aba58a0ef999187fffc26910ac7f57d14fa87942a7fc82 | Python | 33,505 | 602 | #!/usr/bin/env python3
"""
File: pre_process_decon_expression_matrix.py
Created: 2021/07/06
Last Changed: 2022/04/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 publis... |
fce234632f3e13118c6f96a96df3b8718948d85039168b7b7546c3570bcc2904 | Python | 33,622 | 1,163 | # %% [markdown]
# # THE MIND OF A MAGGOT
# %% [markdown]
# ## Imports
import os
import time
import warnings
import colorcet as cc
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.transforms as transforms
import numpy as np
import pandas as pd
import seaborn as sns
from anytree import LevelOr... |
0a3bbb2597dd534f3584e9a7effe7b0b8ffd365a6eb2f29b65d3f555fce7d344 | Python | 33,719 | 867 | # 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... |
bc3de1e4134ac07909c732fdac19973f3f151fc34889c9cad67738874e0d66ac | Python | 33,730 | 748 | import sys
import pickle
#import sys
import os
import re
import numpy as np
import pandas as pd
import random
from PIL import Image
Image.Image.tostring = Image.Image.tobytes
import matplotlib
import matplotlib.pyplot as plt
plt.switch_backend('agg')
from skimage import io
from multiprocessing import Pool
import math
i... |
9d752ff8760d8f94c095380043f5b54a70bcfe662d9d6c0b0c3acf66952512f0 | Python | 33,747 | 965 | #//=============================================================
#//Copyright (c) 2011 G. Gogoshin
#//Distributed under MIT-style license.
#//(see LICENSE.txt or visit http://opensource.org/licenses/MIT)
#//=============================================================
import subprocess
import textwrap as tw
import d... |
369961854310fa1d8825402d14955955fd9e4f7a38170729d381e7ee568b1742 | Python | 33,779 | 625 | import argparse
import logging
import math
import os
import random
import time
from copy import deepcopy
from pathlib import Path
from threading import Thread
import numpy as np
import torch.distributed as dist
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.optim.lr_sche... |
d97f0c4da5deee9b66907b139d279d68677563a065996720e806a38ee232c3ab | Python | 33,809 | 1,175 | # %% [markdown]
# ##
import os
import warnings
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.transforms as transforms
import numpy as np
import pandas as pd
import seaborn as sns
from joblib import Parallel, delayed
from sklearn.exceptions import ConvergenceWarning
from sklearn.manifold im... |
5b43e1f987f4cbd4c8bfaf42c49e84402c6c344eb4ab2005d2bb0721ba62cda2 | Python | 33,868 | 672 | #%%
from pymaid_creds import url, name, password, token
from data_settings import pairs_path, data_date
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 cmasher as cmr
from contools import Cascade... |
e7544ca9e38f9e62df9010e64133f02a44a877bb1e78b9f667164c4293b42003 | Python | 33,904 | 843 | """
Creating a simulation: Simulation class
=======================================
Both initialization and running the simulation is done by interacting with an instance
of :py:class:`polychrom.simulation.Simulation` class.
Overall parameters
------------------
Overall technical parameters of a simulation are gener... |
9ac862cd18c9741da561cd09ac299cfb83d69b5d758783f76cb956c30a9f7f34 | Python | 33,912 | 709 | # Auto generated from validation_datamodel.yaml by pythongen.py version: 0.0.1
# Generation date: 2024-04-14T16:59:08
# Schema: validaton-results
#
# id: https://w3id.org/linkml/validation_results
# description: A datamodel for data validation results.
# license: https://creativecommons.org/publicdomain/zero/1.0/
impo... |
d343864c6f19a326643fd83fc2f9ecccbe61d0435d5a86c4a7a387640aaae20b | Python | 33,945 | 1,158 | """
StyleMapGAN
Copyright (c) 2021-present NAVER Corp.
This work is licensed under the Creative Commons Attribution-NonCommercial
4.0 International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to
Creative Commons, PO Box 1866, Mountain View, CA 94042, U... |
647ddc013a9f05d075bd891d8928587e60c7b21179a30b9072775fac3539a654 | Python | 33,951 | 1,042 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
"""General linear model
References
----------
Fox, J. (2008). Applied regression analysis and generalized linear models.
2nd ed. Sage, Los Angeles.
Hopkins, K. D. (1976). A Simplified Method for Determining Expected Mean
Squares and Error Terms in the An... |
8fc4fb017ea92b5b9430f1db4857022ee5029362b71142d55547835bcc8df94f | Python | 33,955 | 633 | # Auto generated from mapping_rules_datamodel.yaml by pythongen.py version: 0.0.1
# Generation date: 2024-04-25T10:18:46
# Schema: mapping-rules-datamodel
#
# id: https://w3id.org/oak/mapping-rules-datamodel
# description: A datamodel for specifying lexical mapping rules
# license: https://creativecommons.org/publicdom... |
1616a402d2fdbe47c33c2194f57677c55d9e53df29ce619c662c1839a2509ba5 | Python | 33,974 | 840 | #!/usr/bin/env python3
# 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>.
"""Autoware sensor-kit demo (port of TIER IV's autoware-support example).
S... |
9913ef95ac81d91be9c0448b3f01f415d24efabc3734139e9d153ea3bb3813e9 | Python | 34,054 | 674 | # object for analysing and grouping celltypes
import numpy as np
import pandas as pd
import seaborn as sns
import sys
import pymaid
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
import itertools
import connectome_tools.process_matrix as pm
from upsetplot import plot
from upsetplot import fr... |
2aa82b36c5968ce61700f6fc8aea1a6583cf0fa2cfc3b254aa9dfc9f4d08df80 | Python | 34,141 | 906 | """
Mask R-CNN
Common utility functions and classes.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import sys
import os
import math
import random
import numpy as np
import tensorflow as tf
import scipy
import skimage.color
import skimage.io
... |
29ba675494d2e68f5f190ed8370e6399f6c746c97d6f1055e407c4662ba9e9d6 | Python | 34,156 | 797 | import logging
import math
from collections import defaultdict
from dataclasses import dataclass
from enum import Enum
from typing import Dict, Iterable, Iterator, List, Optional, Tuple, Union
from rdflib import OWL, RDF, RDFS
from oaklib.datamodels import obograph
from oaklib.datamodels.similarity import (
Infor... |
bde3449e4b41d4911551e97f29ff4a380ca6d1f404c40316a78932f96a760386 | Python | 34,355 | 846 | #!/usr/bin/env pAAython
# coding: utf-8
from scipy import stats
import numpy as np
import math
from random import randint, sample
def correct_motion_artifact(neuron_signals, idx_MA, inplace=False):
"""
Correct one or several motion artifact(s) by nearest point averaging.
:input neuron_signals: ... |
5a5c40511a1a244e1904b05f6f1c053beec25dc3fd7a6246741d05e9be97ab9d | Python | 34,387 | 754 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
# Modifications Copyright 2017 Abigail See
# Modifications Copyright 2018 Arman Cohan
#
# 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 Licens... |
400e12739460f19054cdc059b4f6291a7ceba1c3a67e688d396962047a298537 | Python | 34,427 | 1,211 | #%% [markdown]
# # Group connection test
# Next, we test bilateral symmetry by making an assumption that the left and the right
# hemispheres both come from a stochastic block model, which models the probability
# of any potential edge as a function of the groups that the source and target nodes
# are part of.
#
# For ... |
4c58b230b3f9a89cb5fcadff37ab513884427dbb53de124f75e951020b64b143 | Python | 34,435 | 1,202 | # %% [markdown]
# # THE MIND OF A MAGGOT
# %% [markdown]
# ## Imports
import os
import time
import warnings
import colorcet as cc
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.transforms as transforms
import numpy as np
import pandas as pd
import seaborn as sns
from anytree import LevelOr... |
62f8c36bf3474f5ced669e44fac783d249aa82448ecd26b737c9788e7d008abe | Python | 34,473 | 675 | ## Functions for pipeline
import xarray as xr
import pandas as pd
import numpy as np
from sklearn.linear_model import Lasso, LinearRegression
from sklearn import linear_model
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import GridSearchCV
from sklearn.neighbors.kde import KernelDensi... |
0058a0495c9a7d2e4994846a5f573b58763cdb395c0baee7cfb9f5ae41c4e639 | Python | 34,538 | 866 | # 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... |
0858e32fee2a79fce9bab1ac96d3d3c40ab8652ed4f4791ecdc0cb2f127fabe0 | Python | 34,623 | 848 | #!/usr/bin/env python
# Copyright (c) 2018 Intel Labs.
# authors: German Ros (german.ros@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""Example of automatic vehicle control from client side, with a python defined agent"""
import ar... |
ffcbfdfc77df613e8b816081f834565f48901c1ee2182e3e7b550bd5e35f8baa | Python | 34,649 | 660 | #%%
import pymaid
from pymaid_creds import url, name, password, token
rm = pymaid.CatmaidInstance(url, token, name, password)
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib as mpl
from data_settings import data_date, pairs_path, data_date_projectome
fro... |
a854c98f4618604c9e3fa287b3ae72cd64d8c3c717f1b28c98d8451bc8a7d81a | Python | 34,732 | 809 | import itertools
import os
import re
import time
from datetime import datetime
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from sklearn.metrics import confusion_matrix, f1_score
from deepsleep.data_loader import NonSeqDataLoader, Se... |
1c0a4d0d3fa301e1efe58f8e2c4e912e91c0dbe1c0a1c853e82c6202ec879392 | Python | 34,733 | 870 | import glob
import json
import math
import operator
import os
import shutil
import sys
import cv2
import matplotlib.pyplot as plt
import numpy as np
'''
0,0 ------> x (width)
|
| (Left,Top)
| *_________
| | |
| |
y |_________|
(height) ... |
9aeb2b855d08485dd88157592a0f335108d2cad683d97a421e70318a0efb671c | Python | 34,743 | 1,096 | import pandas as pd
import glob
import os
import h5py
import sys
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
plt.switch_backend('agg')
import math
import scipy.signal
import statsmodels.api as sm
import pickle
from scipy.fftpack import rfft, irfft, fftfreq
import utils.general_utils as gener... |
3ea51ea355ebe2b8bd36f77cd43c8775fd1a127edecd3a33effe07ce9ee50f15 | Python | 34,753 | 808 | """
=====================================================================================
Auxiliary Module
=====================================================================================
Utility functions that are frequently used in specific experiments
Functions:
------------
Classes:
------------
"""
from sc... |
d2dd9d6d0ba1ac96a667a1eb839846898f98c9afbdb1dee3a091f38da6a5aeeb | Python | 34,753 | 757 | from argparse import Namespace
import csv
from datetime import timedelta
from functools import wraps
import logging
import math
import os
import pickle
import re
from time import time
from typing import Any, Callable, List, Tuple, Union
import collections
from sklearn.metrics import auc, mean_absolute_error, mean_squa... |
1709bb40469ce083f1d39ade5e0b025bfc8431e9bd8ce05716dbb9653dedf6c1 | Python | 34,764 | 1,076 | import inspect
import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import interp1d
from scipy.optimize import curve_fit
from scipy.stats import linregress
from sklearn.linear_model import LinearRegression
from . import basis, kp, kt
__author__ = "Jieqing Jiao <jieqing.jiao@gmail.com>"
# exclude... |
c38323cf7a6779d8c944a53415fbe4bd08f7a354da6ca248f05385362fa3cb66 | Python | 34,798 | 965 | __author__ = "Jianfeng Sun"
__version__ = "v1.0"
__copyright__ = "Copyright 2023"
__license__ = "GPL v3.0"
__email__ = "jianfeng.sunmt@gmail.com"
__maintainer__ = "Jianfeng Sun"
from typing import Dict, List, Optional, Tuple, Union
import numpy as np
import pandas as pd
from tmkit.position.scenario.Separation import... |
6509bbff76100f6dd1ace130e50956dde5d8e304d24e919623fbdaea852013a7 | Python | 34,904 | 679 | import json, time, random, datetime
import os, sys, glob, csv, re, argparse
import numpy as np
import networkx as nx
import pandas as pd
from collections import defaultdict
from scipy.sparse import csr_matrix, lil_matrix, save_npz, load_npz
from collections import defaultdict
from gnn_prep_main import GNN_PreProcess
i... |
198edaeef586c670532f23593175b393b8f9cf52813dc4897545f12dbf58ebc2 | Python | 34,911 | 1,032 | """Functions to calculate and plot network connectivity."""
import os
import logging
from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union
import numpy as np
from nilearn import plotting
from scipy import stats
import matplotlib.pyplot as plt
from osl_dynamics.analysis.spectral import get_fr... |
776948eb28b342c223044c9a5662d1a5982cf2420c73fc25fa671b3977d8e89a | Python | 34,947 | 619 | # Copyright (c) 2016, Konstantinos Kamnitsas
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the BSD license. See the accompanying LICENSE file
# or read the terms at https://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_im... |
65d68bb2eb119588cebd33ef62ae449753f7a9baaa9a5f660829ccfadcd8cc26 | Python | 34,970 | 775 | #!/usr/bin/env python3
"""
File: visualise_ct_mediated_eqtl_replication.py
Created: 2022/02/16
Last Changed: 2022/02/21
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 pub... |
729436cd3a6ac426d87620234946c7b1847772c2446e6c979e6ffaffd8c46183 | Python | 34,983 | 897 | # Copyright 2021 DeepMind Technologies Limited
#
# 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 agr... |
3b2b5050643766b7c6d55fdc88a77e5710187680e59b5e6862a479c770fafef8 | Python | 35,021 | 902 | """Initialization of model parameters before the full training.
Every initialization method trains a few candidate initializations for a
short time and keeps the best. The multi-start loop
(:meth:`InitializationMixin._run_multistart`) is shared by all models and
a candidate is just a function that sets the initial par... |
5611124942dc094c4f14db9b355af6aa098675389bb7a6a1c29f73bff480a31a | Python | 35,024 | 758 | import numpy as np
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule, bias_init_with_prob, normal_init
from mmcv.ops import DeformConv2d
from mmdet.core import (PointGenerator, build_assigner, build_sampler,
images_to_levels, multi_apply, multiclass_nms, unmap)
from ..builder i... |
0aa8d67c20f3ebefc0c33a81e8ee9aeb329c9000bf7a9a7eb3e4df7fbc49098a | Python | 35,038 | 707 | """
Attenzione, non posso fare toggle tra input
"""
from ExternalFunctions import crea_e_o_apri, savelookuptable, savepeaktrain
import os
from datetime import date
from Lif_Initialization import *
from Lif_Plot import *
import threading
seed(val)
###########################################
# User defined simula... |
807009105702fc42f6297cfa839f8fc86ca00e8ae10a15a113c945594684cbe3 | Python | 35,069 | 781 | """
@author: Michele D'Orazio
———————————————————————————
Michele D'Orazio, PhD
Dept. Electronic Engineering
Interdisciplinary Center of Advanced Study of
Organ-on-Chip and Lab-on-Chip Applications (IC-LOC)
University of Rome Tor Vergata
Via del politecnico 1, 00133 Roma, Italy
contact: michele.d.orazio@u... |
904ce1c313073ead69201a7cac7aaa441c769651b596fa9c8fed809ecce3423d | Python | 35,249 | 762 | import logging
import math
import shutil
from abc import ABC
from collections import defaultdict
from dataclasses import dataclass, field
from pathlib import Path
from typing import List, Any, Iterable, Optional, Type, Dict, Union, Tuple, Iterator
import rdflib
import requests
import semsql.builder.builder as semsql_b... |
2cb443cf451bfb9484aab981c54ae64ab537bae08355c5ada05991b6216e1e13 | Python | 35,299 | 653 | """
A Vocabulary maps strings to integers, allowing for strings to be mapped to an
out-of-vocabulary token.
"""
import codecs
import logging
import os
from collections import defaultdict
from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Union
from typing import TextIO # pylint: disable=unused-imp... |
703cb6f75ec5886d07171c34da408081fdfba52a77dce04217407eb48d90c8ca | Python | 35,358 | 879 | # -*- coding: utf-8 -*-
"""
goerge
simulator class
@author: Yaning Liu
"""
from __future__ import print_function
from abc import ABCMeta
import numpy as np
import os
import sys
import shutil
import re
import subprocess
import time
import glob
import csv
import pandas as pd
class simulator(object):
""" A simulato... |
72566fbf3f2a2bdca79b3886d3d6518c06acc18f41965c41e12063044801d19a | Python | 35,419 | 796 | from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
import numpy as np
import matplotlib.pyplot as plt
import torchvision
import torch.optim as optim
import os, sys
import datetime
from shutil import copyfile
## linear prediction
## return prediction of dynamics
## ... |
aec0c30ed8a381e72c61c4ae1a8b5bd096ffbd63a8f08d83a551893c7a5f9ec6 | Python | 35,419 | 554 | #%%
from pymaid_creds import url, name, password, token
from data_settings import data_date, pairs_path
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 numpy.random as random
import gzip
import cs... |
949273600d9166deb9aaf4108624c8d056eb6e83de3a7335e3404af905c04f91 | Python | 35,449 | 929 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
"""Pre-processing operations based on NDVars"""
from collections.abc import Sequence
from copy import deepcopy
import fnmatch
from os import makedirs, remove
from os.path import basename, dirname, exists, getmtime, join, splitext
import mne
from scipy import sig... |
872b2fb0fe763359e008d5e0745cb50c3cea19b2ff4d6cd980e65d14a0e1744d | Python | 35,450 | 739 | """Local ground-truth preview: draw the exported ClipGT scene back onto the captured RGB.
carla-cosmos preview --clip clips/<id> [--cameras ...] [--frames a:b] [--out DIR] [--grid]
[--show-occluded] [--png-every N] [--no-horizon]
This is the check you can run on a laptop, with no GPU node... |
27430c0d8647572fed3c7f7c978aefbcb60599a46d9480e6337e8aed0f9b6ca4 | Python | 35,452 | 781 | #!/usr/bin/env python3
"""Import an FBX pedestrian into CARLA as a spawnable walker.
python3 import_walker.py ~/models/SK_AfroBoy01_G3.fbx \
--gender male --age child --speed 0.0,1.1,2.0
The FBX must be skinned to CARLA's GEN3 pedestrian rig (26 `crl_*` bones);
check_input.py runs first and stops the impo... |
0039538ab537b593d54153b5c410de6e7240d174bd7defbc6065f1d2fbebe232 | Python | 35,464 | 817 | import sys, os
import numpy as np
import nibabel as nib
from scipy import ndimage as ndi
from scipy.signal import convolve
from numpy.linalg import norm
import networkx as nx
import logging
import traceback
import timeit
import time
import math
from ast import literal_eval as make_tuple
from skimage.measure import labe... |
7697f7ff664ba91a149c9f7ff48ceb13200edc59f08fc92841a94933b7716a7f | Python | 35,515 | 922 | """Reusable visualization helpers for CROPro notebooks.
Two public classes are provided:
``ResampleViewer``
Compare T2W, ADC and HBV images before and after resampling onto the T2W
grid, plus an overlay panel to verify spatial alignment. Mirrors what
``check_resample_to_t2w.ipynb`` does interactively.
`... |
fc658d72596f0c0ec21e054d3005b3859951ff68c7428be07a59f06793c9a145 | Python | 35,576 | 845 | import torch
import torch.nn as nn
import functools
from torch.autograd import Variable
import numpy as np
from torchvision import transforms
import torch.nn.functional as F
###############################################################################
# Functions
#####################################################... |
b6480907087e9f2f44a5732e41d3af3d028a978c3c9a596f7502ae477ffbaeae | Python | 35,592 | 694 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 26 16:18:44 2021
@author: admin
"""
from __future__ import print_function
# Import libraries
import os
import numpy as np
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
from PIL import Image
import cv2
import math
imp... |
a70a4b617df7bf9b94332c692ac7d1d04b350f0494dda970a98c91f8608db39f | Python | 35,609 | 803 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import argparse
import os
import json
import glob
import random
import collections
import math
import time
parser = argparse.ArgumentParser()
parser.add_argument("--i... |
71b41fc1961b0c5e9e277181d8be6e8f9312c0e7600cfc39ccba558769484849 | Python | 35,620 | 1,159 | import nibabel as nib
import numpy as np
import logging
from dipy.io.gradients import read_bvals_bvecs
import dipy.core.gradients as dpg
from dipy.data import default_sphere
import pimms
import dipy.reconst.dki as dpy_dki
import dipy.reconst.dti as dpy_dti
import dipy.reconst.fwdti as dpy_fwdti
import dipy.reconst.m... |
0f6048a34dc5d54dc73c6732e154ab55f7b31ed9ed1df59968a2bbcca1656886 | Python | 35,645 | 775 | #!/root/anaconda/bin/python
"""
Written by Vijay Namboodiri and Randall Ung of the Stuber lab in
UNC Chapel Hill.
This program runs SIMA motion correction or ROI extraction in parallel for
multiple files stored on S3. Since multiple simultaneous SSL connections
are not alloweed on to S3 from the same computer with di... |
f4d0c49bf03ecfa0bd99c540261f12620554403bdd62a6e6ba71adb429de7449 | Python | 35,649 | 681 | #%%
import pymaid
from pymaid_creds import url, name, password, token
rm = pymaid.CatmaidInstance(url, token, name, password)
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib as mpl
from data_settings import data_date, pairs_path, data_date_projectome
fro... |
71c98a2ba2a3f6975c883be47271bee84f66b6b6b3b2ee998a4573e2cb7c2f34 | Python | 35,741 | 1,073 | # 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... |
ee176d739e6f06c66ed59465337b2ee333e076ce3d3c453a2c11a43609e87dcd | Python | 35,741 | 666 | #!/usr/bin/env python3
"""
File: compare_deconvolution_matrices.py
Created: 2020/09/03
Last Changed: 2022/02/10
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 ... |
476bc8bb1063dca1db8c5097a82dfd76f4a657add4ed3dacc58f4b2995417b99 | Python | 35,746 | 1,151 | # Auto generated from fhir.yaml by pythongen.py version: 0.9.0
# Generation date: 2023-02-27T10:18:53
# Schema: fhir
#
# id: https://w3id.org/oak/fhir
# description: Schema for working with FHIR objects (Partial). This is currently intentionally incomplete. The
# sole purpose of this rendering of FHIR is p... |
70ddb269f482b3f9c96066a3b4aa4a6fec779baf2ebfa28e2203eb2e013bde01 | Python | 35,753 | 915 | # cython: language_level=3
# Time-stamp: <2024-10-22 16:26:57 Tao Liu>
"""Module for ReadAlignment collection
Copyright (c) 2024 Tao Liu
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License (see the file COPYING included
with the distribution).
@status: experiment... |
1f81c8d943789e80830ea07f81f743b5577117dcb3cc46eda29c70ae6405fe04 | Python | 35,816 | 853 | # 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... |
3f76bd4a37142e1858327ecc46e76371cb9ee1bafa7bbe04512ec950940cc730 | Python | 35,828 | 839 | import sys
import pickle
import user.usersettings as UserSettings
import numpy as np
import math
from random import Random
from datetime import datetime
from mpi4py import MPI
from core.system import mprint
class _SimulationBuffer:
def __init__(self, ptr_scoring_function):
self.__... |
6ddc234122c30b498a583decba4092da3b38bc9f5ecb679b45afac943959f900 | Python | 35,830 | 972 | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from builtins import zip
from builtins import range
from builtins import object
import itertools as it
import warnings
import numpy as np
from scipy.special import gammaln
try:
from bottleneck import nansu... |
9f4d2a14e4600b0a7502f7665414877071981cac560c837d2e172484058b26ac | Python | 35,831 | 932 | from __future__ import print_function, division
import os
import time
import warnings
import random
import csv
from random import sample
from copy import deepcopy
import multiprocessing
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from torch.opt... |
a03fdef8e024803984665bcb0b2089adf672248b70b995a7c724aaaf76d2a2d1 | Python | 35,893 | 862 | #!/usr/bin/env python3
# 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>.
"""Static documentation-gap audit for a CARLA checkout (Tier A).
Reads only f... |
e8e8a4961540608710c6cbeafbf855e4a9296f1ce0be5f23e90fdf91703c48ae | Python | 36,050 | 987 |
#%% Imports
import torch
from torch.autograd import Function
import torch.nn as nn
from qiskit import QuantumCircuit, Aer, execute
from qiskit.circuit import Parameter
from qiskit.extensions import UnitaryGate
import numpy as np
from numpy import pi
import collections
import random
import pandas as pd
import multipr... |
10851224706ec8d228a21a3451d75af79fefa2f5db9cad91f5742c1670ea6d61 | Python | 36,123 | 958 | ###################################################################
####
#### Version: 1.1.7
#### Date: 6/24/2023
#### Description: This file creates the GUI for NRN-EZ.
#### Author: Evan Cobb
####
###################################################################
import sys
import globvar as gv
from PyQt5.QtWidgets... |
a517ba1be101a44d1f2de138e36f12752cdba761bf9372c908774810a0ea7083 | Python | 36,162 | 1,012 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# Copyright 2020 Blaise Frederick
#
# 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.... |
1206c7b7c7b44602a7acc4baf501cef85221ec56b4cc933cdca82ce26997ab4d | Python | 36,188 | 1,003 | # 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... |
3fe515085ef139bf668630f33db154246418fb8aabf2324a4178ef8e77ea8019 | Python | 36,191 | 943 | from __future__ import print_function, division
import os
import time
import warnings
import random
import csv
from random import sample
from copy import deepcopy
import multiprocessing
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from torch.opt... |
a7ea171b0b48f8d045c2e09076b37b3016461fb297a4f4e1bbbcbb20e4084794 | Python | 36,241 | 986 | """bmesh_face_ops.py:
A set of utilities and operators for handling faces of bmesh objects.
"""
__author__ = "Marwan Abdellah"
__copyright__ = "Copyright (c) 2016 - 2017, Blue Brain Project / EPFL"
__version__ = "0.1.0"
__maintainer__ = "Marwan Abdellah"
__email__ = "marwan.abdellah@epfl.ch"
__st... |
0b4b91fe393e3c40c8b95fcdee8c119f1531a9d12555bce7d5119f7c6662fad1 | Python | 36,268 | 855 | import torch
import torch.nn as nn
from mmcv.cnn import bias_init_with_prob, normal_init
from mmcv.ops import DeformConv2d, MaskedConv2d
from mmcv.runner import force_fp32
from mmdet.core import (anchor_inside_flags, build_anchor_generator,
build_assigner, build_bbox_coder, build_sampler,
... |
585d4075285f010363007a924050435f2d6af6feb908d5bbb7c008c33c8c3045 | Python | 36,300 | 1,180 | import os
import numpy as np
import math
import pandas as pd
import cv2
import pickle
import colorsys
import pyqtgraph as pg
import pyqtgraph.opengl as gl
import scipy.ndimage as ndi
from scipy.interpolate import interp1d, splprep, splev
def read_qss_file(qss_file_name):
with open(qss_file_name, "r", encoding="UT... |
d99a2963e48c07c6844acd84fdf20448ff9d3c0b93cf3a3ae6a4743debe00b11 | Python | 36,359 | 967 | """Custom Tensorflow callbacks."""
import logging
import os
import re
from typing import Dict, List, Optional, Tuple, Union
import numpy as np
import tensorflow as tf
from tensorflow import tanh
from tensorflow.keras import callbacks
from osl_dynamics.inference import metrics, modes
from osl_dynamics.utils.progress ... |
5bdd6389426953f279024a555e4c027ffa33abb2ff4ab719e9b771985ecae33a | Python | 36,544 | 1,023 | """DIVE (DyNeMo with Integrated Variability Estimation)."""
import logging
from typing import List, Tuple, Union
from dataclasses import dataclass
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
from tensorflow.keras import layers
from osl_dynamics import data
import osl_dynamics.data... |
266349e58936acdf829e2447d02e0ccc7da06b7d7722533fc2da2b227836c504 | Python | 36,546 | 834 | ######################################################################################88
FREDHUTCH_HACKS = False # silly stuff Phil added for running on Hutch servers
if FREDHUTCH_HACKS:
import os
# I think this has to happen before importing tensorflow?
os.environ['XLA_FLAGS']='--xla_gpu_force_compilation... |
ad55e67686a618cabd0c3a4ef5ea7442300a9b6299b1a2a47afc886516317223 | Python | 36,595 | 948 | from __future__ import print_function, division
import os
import time
import warnings
import random
import csv
from random import sample
from copy import deepcopy
import multiprocessing
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from torch.opt... |
d2fc206451fd4ce9a84a9fa979f13ed83182f20b62a66a727689c3c48c13aa55 | Python | 36,621 | 912 | """An OAK implementation that wraps Large Language Models."""
import base64
import json
import logging
import re
import time
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Dict, Iterable, Iterator, List, Optional, Tuple
import numpy as np
import pystow
from linkml_runtime.dumpers import yaml... |
4a117707250e64e8e1c11139da5c76642c3cc2712641055cbf4965aa50e56d16 | Python | 36,653 | 754 | try:
import cupy as cp
gpu_mode = True
except Exception as excpt:
print(excpt)
gpu_mode = False
import numpy as np
import pandas as pd
import h5py
from numpy.lib.arraysetops import isin
from scipy.special import erf
from scipy.special import erf
from scipy.signal import find_peaks, convolve
from mat... |
25fc1b0de463f72a1254614df4af42c8a2098da065b8cb5eace3db924f5f0064 | Python | 36,743 | 864 | import torch
import torch.nn as nn
from mmcv.cnn import bias_init_with_prob, normal_init
from mmcv.ops import DeformConv2d, MaskedConv2d
from mmdet.core import (anchor_inside_flags, build_anchor_generator,
build_assigner, build_bbox_coder, build_sampler,
calc_region, for... |
273a2422090d3303f536201fffb48770ce641171f4b9d3debde0b392e69fdc5b | Python | 36,809 | 940 | import itertools
import matplotlib.pyplot as plt
import numpy as np
import os
import pickle
import seaborn as sns
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import warnings
from pandas import DataFrame
from torch.utils.data import DataLoader, TensorDataset
from sklea... |
a0c8821689d9fbddb1a8d3c65a01be3cf3c88f37a4a37f4e19ed34c199002058 | Python | 36,816 | 939 | #!/usr/bin/env python3
"""
Main file for phys2cvr.
Attributes
----------
LGR :
Logger
"""
import datetime
import logging
import os
import sys
from copy import deepcopy
import nibabel as nib
import numpy as np
from tqdm import tqdm
from phys2cvr import _version, blocks, io, signal, stats, utils
from phys2cvr.cli... |
d0fe3c505de28bee15edc04b9b1fe15a7999feb65f288f3d9c74b215dbf5f429 | Python | 36,828 | 882 | from PyQt5 import QtWidgets, QtGui, QtCore
import pyqtgraph as pg
import pyqtgraph.opengl as gl
import logging
from locale import setlocale, LC_NUMERIC, atof
import psutil as ps
import numpy as np
from pathlib import Path
import colors
logger = logging.getLogger('Fishlog')
def remove_alpha(gradient):
"""
Remo... |
0303d594d0a94b6ca59dc83ea81f91305c2537d42469e9ace989f1aa43b636b0 | Python | 36,852 | 924 | """
Utilities for loading configurations, instantiating Python objects, and
running operations in _Selene_.
"""
import os
import importlib
import sys
import json
from time import strftime
import types
import numpy as np
import random
import torch
from torch.utils.tensorboard import SummaryWriter
import hashlib
import ... |
288a0da5458bbd6d4ca3457876e70e2d0ee182b08c5ade678a4df32395154c12 | Python | 36,894 | 857 | #!/usr/bin/env python
# The code originally used to run OMP simulations and generate the results reported in the manuscript [1]. These files are provided for replicating the results in this work. In the future use ompmodel.py for the latest implementation of the OMP model, that just provides an interface to running th... |
63ffb6395dd4e2522fcd340dec922a030351c78e1cc3ddc641978118f283d13f | Python | 36,918 | 922 | import numpy as np
from tensorflow import keras
import os
import h5py
import random
from PIL import Image
import nibabel as nib
from nilearn.image import resample_img
from skimage.exposure import equalize_adapthist
from scipy.ndimage import zoom
import tensorflow as tf
import ddmr.utils.constants as C
from ddmr.utils.... |
aa3cff6353faa0d3330134103453d5dc0a03b8ec4ead5ad3b9e8006cd28a4f62 | Python | 36,955 | 959 | from __future__ import print_function, division
import os
import time
import warnings
import random
import csv
from random import sample
from copy import deepcopy
import multiprocessing
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from torch.opt... |
a015b1b6b2314f629672e811c9d93b3188f8f0fd75f394e331a441f13b88e837 | Python | 37,015 | 1,237 | import numpy as np
import pandas as pd
import numba
from matplotlib import pyplot as plt
from matplotlib.colors import LinearSegmentedColormap as LSCMap
import matplotlib.ticker
import matplotlib.cm
import matplotlib.colors
import matplotlib.transforms
import matplotlib.patches
import matplotlib.gridspec
import matplo... |
db1e4957ed90dbe3fe2f6e77e1944b1813b017e0d3c4a8460f2cef1e6c88bb15 | Python | 37,076 | 1,140 | __author__ = 'jieqing jiao'
__email__ = "jieqing.jiao@gmail.com"
import numpy as np
import scipy
from scipy.optimize import curve_fit
from scipy.stats import linregress
from sklearn.linear_model import LinearRegression
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
import inspect
from niftypad... |
faebd40d3e8741b8383072bace0686149e5e5a4f0413f19f62fd4d54204af72c | Python | 37,171 | 1,117 | """Helper functions for post-hoc analysis."""
import itertools
import logging
from typing import List, Optional, Tuple, Union
import numpy as np
from scipy import signal
from osl_dynamics.utils import array_ops
from osl_dynamics.utils.progress import parallel_map
_logger = logging.getLogger("osl-dynamics")
def au... |
c4f9f6fcbd8859c316540de0be3ef00e5e34c28a7ebddd8d47d60f44a9f51d34 | Python | 37,416 | 1,010 | # Copyright 2021 DeepMind Technologies Limited
#
# 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 agr... |
da3547ff476c68ef8f3875cda8d66663b342261b150fe696732f4297e7b4dd0e | Python | 37,427 | 921 | import string
import copy
import itertools
import os
import numpy as np
import nltk
from nltk.tokenize import word_tokenize
from enum import Enum
from itertools import compress
from tqdm import tqdm
from ArticleDataSample import ArticleDataSample, CommonSectionNames
from util import tprint, cosine_similarity
from w2v_... |
6f96b6b7ff3be2c40b2f8fc77ddfdbda3249d1b92f7260a80a4cf09a682006b9 | Python | 37,441 | 779 | import random
import scipy
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from matplotlib import rc, rcParams
from mpl_toolkits.mplot3d import Axes3D
rc('text', usetex=False)
rc('axes', linewidth=1.5)
rc('font', weight='regular')
cm... |
e5bf262bcd6cd544039d2c342c6b0d379048d648dd514cf2841cf9c206069ef8 | Python | 37,696 | 782 | """Multivariate coupling kernels: canonical coherence/coherency, MIC, global coherence.
Array-level computations behind the group and multivariate measures of
:class:`Connectivity`.
"""
from logging import getLogger
from typing import Any
import numpy as np
from numpy.typing import NDArray
from spectral_connectivit... |
9e42a06d6306c5f4708d420e2db86b5ccc4c6ec0ddc40d18b7db3931ebe458e6 | Python | 37,709 | 907 | import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import os
import sys
import pandas as pd
import numpy as np
import gym
from gym import spaces
import sim_analysis
import tqdm
from pprint import pprint
import config
from scipy.spatial.distance import cdist
class PlumeEnvironment(gym.E... |
5f5e4fe78826fc75d7b770812959b7db292ebcd953a6a1a88546bf6945ca50c9 | Python | 37,729 | 734 | """ClipGT scene exporter: CARLA ground truth -> NVIDIA world-scenario Parquet.
Produces the exact tables consumed by
``cosmos_transfer2/_src/imaginaire/auxiliary/world_scenario/dataloaders/clipgt_loader.py``
(schemas dumped from NVIDIA's ``multiview_example1`` and verified geometrically
in the Phase 0 spike): ``egomot... |
71fcaac9774d9c42141b4d372bd491ff258a48de340cce69164602390e933797 | Python | 37,765 | 960 | """
This module defines the NeuronModel and PointNeuronModel classes.
The NeuronModel class creates a multicompartmental neuron model by connecting
individual compartments and merging their equations, parameters, and custom
events. This model can then be used for creating a population of neurons through
Brian's Neuron... |
d507c08decb9c1c93a67ac78fc79f45ac91bba0d81f919feeed3ec1b6c2a9118 | Python | 37,852 | 1,113 | #!/usr/bin/env python
# Copyright (c) 2025 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>.
"""
Example script to generate realistic traffic with the InvertedAI API
"""
... |
5acb4e7b964ac230869f941ef10080744141e4ab094684a00dc1961a6c3d3273 | Python | 37,856 | 1,008 | """Temporal Interval Network Density Analysis (TINDA).
This module contains functions for calculating the density profile (i.e.,
fractional occupancy over) in any interval between events it is originally
intended to use it on an HMM state time course to ask questions like what is
the density of state :math:`j` in the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.