sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
9363c2bf4bf93e02111b6be374f45f5e5fe1e963cdd240bb01eca9ca3c7aedbc | Python | 46,158 | 1,666 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# Copyright 2016-2019 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/LICEN... |
0c8da738847763126b17a9aabac3a9a8353b97c82dd72c6b8467062d85088919 | Python | 46,163 | 1,123 | import logging
from collections.abc import MutableMapping, Mapping
import AFQ.data.fetch as afd
import AFQ.utils.volume as auv
from AFQ.tasks.utils import get_fname, str_to_desc
from AFQ.definitions.utils import find_file
import numpy as np
import nibabel as nib
from dipy.io.streamline import load_tractogram
loggin... |
632a65362a99d0b539b7038fb0b8e338d790fa29f955858beec4e9d8063c4f03 | Python | 46,191 | 1,293 | """
Code to manage results of many simulations together.
"""
import pandas as pd
from tctx.networks.turtle_data import DEFAULT_ACT_BINS
from tctx.util import sim
import os.path
import logging
from pathlib import Path
import json
from tqdm.auto import tqdm as pbar
import datetime
import h5py
import numpy as np
impor... |
ad05865dd72568b301d33597b6d14a671130329e135c191cfa98aa669994bcb1 | Python | 46,216 | 786 | # -*- coding: utf-8 -*-
from connect import *
import numpy as np
import os
from tkinter import *
from tkinter.filedialog import askdirectory
from tkinter import ttk
import datetime
###############################################################################################################################
... |
7e38347939dacacf51ce6c2c812e2367adadaac5d0b6988ebc7507cb70dbbf63 | Python | 46,260 | 1,064 | from math import ceil, log
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import ConvModule, bias_init_with_prob
from mmcv.ops import CornerPool, batched_nms
from mmdet.core import multi_apply
from ..builder import HEADS, build_loss
from ..utils import gaussian_radius, gen_gaussian_t... |
ec0e657c805277cc5d8e763ed52f3548402f9902c252261c393405c585e39532 | Python | 46,384 | 1,097 | #!/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>.
# Allows controlling a vehicle with a keyboard. For a simpler and more
# docu... |
2b7b0d388a6b504df476a00d0092321dcbdbc6bcb60fee6dc6107a35c0563412 | Python | 46,493 | 743 | import itertools
import logging
import os.path as osp
import tempfile
import numpy as np
from mmcv.utils import print_log
from terminaltables import AsciiTable
from .builder import DATASETS
from .coco import CocoDataset
@DATASETS.register_module()
class LVISV05Dataset(CocoDataset):
CLASSES = (
'acorn',... |
a0860e880a96294a96b81e0befdc9076adb03ae1e000505030ca05d0c9c027de | Python | 46,578 | 816 | #!/usr/bin/env python
"""
Utility functions for Catactor.
"""
__author__ = "Kawaguchi RK"
__copyright__ = "Copyright 2019, ent Project"
__credits__ = ["Kawaguchi RK"]
__license__ = "MIT"
__version__ = "0.1"
__maintainer__ = "Kawaguchi RK"
__email__ = "rkawaguc@cshl.edu"
__status__ = "Development"
import pandas as pd
... |
dc54cdb6824d1b67ce132a24f845de51e903814eb182d43f6244244f1d7f7e17 | Python | 46,684 | 1,478 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
"""Statistical tests for univariate variables"""
from functools import partial
import itertools
from typing import Union
import numpy as np
import scipy.stats
from .. import fmtxt
from .._celltable import Celltable
from .._data_obj import (
CategorialArg, C... |
710edfc9ce3a1be898bb3ff2656ef115554db9063b770737254285ebf865f1bf | Python | 46,705 | 1,127 | import os
import time
import logging
# Tensorflow
import tensorflow as tf
import tensorflow_probability as tfp
tf.compat.v1.disable_v2_behavior()
import numpy as np
import pandas as pd
from .layer import layer
from .layer import KL_divergence_normal
from .layer import create_variance
from .layer impor... |
285fd58276e00a1f125d150858494e063b53aeda75f00d79a2239f4760475d9d | Python | 46,809 | 1,014 | #!/usr/bin/env python3
"""Convert a CARLA town's OpenDRIVE into an Autoware-consumable lanelet2 .osm.
Input is either ``--xodr <file>`` (offline) or a running CARLA server
(``--host/--port``), in which case the map is pulled live via
``world.get_map().to_opendrive()``.
Engine: commonroad-scenario-designer (the mainta... |
06783b9aea3d65998c8f862fdb9998ea5e5deeccaaf4d28712a6a35e5eba48d1 | Python | 46,820 | 1,365 | # 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... |
fb3146528498e71a6945fca1089f6de6a15c46176249a05f2d18360f89b27d87 | Python | 47,247 | 1,435 | # This code is based on the exercise code repository accompanying
# the book: Neuronal Dynamics (see http://neuronaldynamics.epfl.ch)
# located at http://github.com/EPFL-LCN/neuronaldynamics-exercises.
#
# The book is also published in print:
# Wulfram Gerstner, Werner M. Kistler, Richard Naud, and Liam Paninski.
# Neu... |
f214bc56d1b4e1876d49373b3e25dfb0ef8d1326c6afaa5cf55c6becb0ab3a3d | Python | 47,360 | 1,240 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
"""I/O for MNE"""
from collections.abc import Iterable
import fnmatch
from itertools import zip_longest
from logging import getLogger
import os
from pathlib import Path
import re
import numpy as np
import mne
from mne.source_estimate import _BaseSourceEstimate
... |
a73caaf994d34776feae5bebcd7e6572b3e5497497b26da3350e36e24456a180 | Python | 47,381 | 1,004 | # @Author: Thijs L van der Plas <thijs>
# @Date: 2020-11-23
# @Email: thijs.vanderplas@dtc.ox.ac.uk
# @Filename: plotting_functions.py
# @Last modified by: thijs
# @Last modified time: 2020-11-23
## module with plotting functions
import numpy as np
# import numpy.matlib
import h5py
import matplotlib.pyplot as ... |
9182a1ce37edceea6e49f4bf8483126fe04dbe5f3e0142bdb98ad1dc6ec5254b | Python | 47,548 | 951 | import random
from qiskit import *
import numpy as np
import importlib
import copy
import math
from qiskit.providers.aer.noise import NoiseModel
from qiskit.providers.aer import AerSimulator
from itertools import *
from qiskit.test.mock import *
import warnings
import braket.circuits
from datetime import datetime
impor... |
a2351a8ffac21e269a67e6da7b89bf829dfe9a23eb6ae2f7bbcfcaa9ac3d518d | Python | 47,635 | 1,280 | """Observation models for simulations."""
from typing import Optional, Tuple, Union
import numpy as np
from osl_dynamics.utils import array_ops
class MVN:
"""Class that generates data from a multivariate normal distribution.
Parameters
----------
means : np.ndarray or str
Mean vector for e... |
0e86efa381fbc501573fc022c1a34ccca5ff46fd27da549566b41ec1ab462fa8 | Python | 47,668 | 1,240 | # 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... |
0d129556fdf4bebdcf1bffb32f087c134313f021a89c2393bbed21489590c6f9 | Python | 47,684 | 981 | import pandas as pd
import os.path
import seaborn as sns
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from scipy.stats import rankdata, spearmanr, mstats
import numpy as np
import matplotlib.cm as cm
from collections import defaultdict, Counter
from sklearn.preprocessing import MinMaxScaler
f... |
fd278a9087d88bf12b3e62bb7950171af0393278e9829f6ddc421ab447257ccb | Python | 47,712 | 1,616 | #!/usr/bin/env python
"""
quot.helper.py -- low-level utilities
"""
# Paths
import os
from glob import glob
# Numeric
import numpy as np
# Dataframes
import pandas as pd
# Special functions
from scipy.special import erf
# Image processing utilities
from scipy import ndimage as ndi
# Load *.mat format files
f... |
23746bd7ece427f944b22d38995bee5e423f70bc660011cfc7adc12176207b7a | Python | 48,081 | 1,193 | # 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... |
42af94fb0420a1b5b70f89ab86452c94c5252aaf3c2d6a5b9a39f04dd52d287c | Python | 48,086 | 1,161 | """
========================================================================================================================
Parameters Module
========================================================================================================================
(incomplete documentation)
Module for dealing with mode... |
3308778cbbdc4288c7ea1cd6523fd8f3ba67856bdb286e75668fb68882a34f38 | Python | 48,449 | 1,219 | import os
import copy
import pickle
import time
from datetime import datetime
from abc import ABCMeta, abstractmethod
import pandas as pd
import numpy as np
import torch
from sklearn import preprocessing
from utils.my_data_loader import *
from utils.my_utils import timeSince, save_all_vars, make_softmax_dir
from uti... |
1be4407737674f6ca3d42fcf515f87dc3b2b2854af28bec9028c1f9c408f4ec1 | Python | 48,805 | 746 | from Lif_SpatialConfiguration import *
from ExternalFunctions import connecting_int, createWeightMatrix, connecting_3D, connecting_ext
import random
import itertools
seed(val)
def conneting_population(pop: NeuronGroup, exc: NeuronGroup, inh: NeuronGroup, p_max: float):
"""
Connecting the single layer. Elim... |
4f4b9ca24b82dac64c20a17be674600a193074c9ec1df6c065be0bbb7eb0bac0 | Python | 48,843 | 1,159 | # 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... |
fd568146f0a7c1b0fef36ab8859baeec40da55bcb497134cba459c27f97a5411 | Python | 48,880 | 1,268 | """
MultiQC report module. Holds the output from each module. Available to subsequent
modules. Contains helper functions to generate markup for report.
"""
import base64
import dataclasses
import fnmatch
import gzip
import inspect
import io
import json
import logging
import mimetypes
import os
import re
import shutil
... |
8d9160703f97f4a04435127c35e8a30e91c34002845d36e32efffd7b6a152d22 | Python | 49,015 | 1,231 | # Built-in
from copy import deepcopy
# Third-party
import brian2 as b2
import numpy as np
import pandas as pd
from brian2.units import * # noqa: F403
# Local
from cxsystem2.core import equation_templates as eqt
from cxsystem2.core.parameter_parser import NeuronParser, SynapseParser, value_extractor
from cxsystem2.co... |
066d52bf905f176565e3023810be1689891000c3549b1dcd3fae40d999453990 | Python | 49,064 | 898 | import tensorflow as tf
from saver import Saver
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
import os
import os.path
import sys
import numpy as np
import logging
import time
import h5py
import matplotlib
#matplotlib.use('Agg')
import matplotlib.pyplot as plt
from... |
0628e64363501c3fa40f833a7deec5f84a7b31f5319ea32626c8eb2d838f46a4 | Python | 49,077 | 1,251 | # -*- coding: utf-8 -*-# -*- coding: utf-8 -*-
import warnings
import tempfile
from AFQ.definitions.mapping import SynMap
from AFQ.definitions.utils import Definition
import AFQ.api.bundle_dict as abd
warnings.simplefilter(action='ignore', category=FutureWarning) # noqa
import logging
from AFQ.api.participant import... |
23582d174ed9b24b721bff30737ba787c27702350452869e82a68373237f2f4b | Python | 49,115 | 1,255 | """
Estimate single-trial responses. Output will be saved in the "derivatives" subfolder of the bids dataset.
NOTE: This analysis is resource-intensive in terms of computer memory and cpu usage. It should really only be run on a computing cluster and not on home computers or laptops.
Usage:
python betas.py <subject_ID... |
e942d958c9b202e66030ed85000184a9008e7029a0a4440cd4a01bef89cbd8b6 | Python | 49,153 | 1,020 | #%%
import sys
sys.path.append('/Users/mwinding/repos/maggot_models')
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
impor... |
e33b745aab7429fb2c800ea55c82c47e7502218c58fa9a93ccab4452a920d3ea | Python | 49,243 | 1,474 | """Preprocessing functions."""
from __future__ import annotations
import json
from pathlib import Path
from typing import Any
import mne
import numpy as np
import matplotlib.pyplot as plt
from mne.preprocessing import ICA
from mne_icalabel import label_components
from scipy import stats
from scipy.ndimage import uni... |
7a92dcd342e62ebeac893952c254f106b0a43b3189b4691ac36aae4edb90c511 | Python | 49,323 | 1,251 | #Copyright (C) 2019 Soeren Lukassen
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#This program is distributed in the h... |
9575f894a38234d227f5ef1e2aca06d108c41b100257098e1f4eab363709ba4c | Python | 49,519 | 1,221 | import logging
import re
import shutil
import sys
from collections import defaultdict
from dataclasses import dataclass
from pathlib import Path
from typing import (
Any,
Dict,
Iterable,
Iterator,
List,
Mapping,
Optional,
TextIO,
Tuple,
Union,
)
import sssom_schema as sssom
from... |
05ad4e10e1fa2986be7d479ffbac54d6cc20c91bbec11899c5f475e11ac98cc6 | Python | 49,665 | 1,084 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 19 12:05:32 2019
@author: rjovelin
"""
import time
import mistune
import os
import scipy.ndimage
from itertools import zip_longest
import base64
from debarcer.generate_plots import PlotDataPerRegion
from debarcer.utilities import DropEmptyFiles, CheckFilePath
from debarc... |
72653d393f7256658ee7b15dce9142f1241be342b2713c3cfdd79e3a3b54020a | Python | 49,680 | 1,169 | # 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... |
74c2c3a691b3082c672e8239e4017dbabb09314dcdf407a32bc44b57f90f0871 | Python | 49,715 | 1,057 | import pandas as pd
import os.path
import seaborn as sns
import matplotlib.pyplot as plt
from scipy.stats import rankdata, spearmanr
import numpy as np
import matplotlib.cm as cm
from matplotlib import gridspec
from collections import defaultdict, Counter
from sklearn.preprocessing import MinMaxScaler
from sklearn impo... |
3e06ac5a36f5bb89650fc94d0dfaa6f77f460b342e8876d725ed3b9b59af2ead | Python | 49,893 | 1,419 | import nmldbutils
import csv
import hashlib
import os
import re
import shutil
import string
import urllib2
import xml.etree.ElementTree as ET
from dateutil.parser import parse as parsedate
from database import NMLDB
from tables import *
from config import Config
from tables import Cells, Model_Waveforms, Models, Cell... |
0432e822219a472e57fa9697200f30a7ccc458246bb6ad4fc63b2f19f6c07bd2 | Python | 49,959 | 1,270 | import matplotlib
matplotlib.use('WebAgg')
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.colors as mcolors
from matplotlib.lines import Line2D
from matplotlib import cm
from mpl_toolkits.axes_grid1 import make_axes_locatable
import tensorflow as tf
import numpy as np
import d... |
ee0973a8fda2928203a3dd4f781c1597fc9d1565fc2b26d82de5a808e2d584fb | Python | 49,982 | 868 | #!/usr/bin/env python
"""
Base Catactor class for meta scATAC-seq analyses.
"""
__author__ = "Kawaguchi RK"
__copyright__ = "Copyright 2019, ent Project"
__credits__ = ["Kawaguchi RK"]
__license__ = "MIT"
__version__ = "0.1"
__maintainer__ = "Kawaguchi RK"
__email__ = "rkawaguc@cshl.edu"
__status__ = "Development"
fr... |
7646470f0f53d251a8f1217a17ce47388a796b234c65efd605dd4f8ed23bc980 | Python | 50,100 | 1,197 | """
This module provides the `AnalyzeSequences` class and supporting
methods.
Based on selene's predict/AnalyzeSequence.py with minor modifications
"""
import math
import os
import warnings
from time import time
import numpy as np
import pandas as pd
import pyfaidx
import torch
import torch.nn as nn
from scipy.stats i... |
6d305da51aaae8dd3cc2cd48d3343b8aa5deb276fcb6fc65fada65a779600ed8 | Python | 50,180 | 1,026 | # Auto generated from obograph.yaml by pythongen.py version: 0.0.1
# Generation date: 2025-02-05T11:24:54
# Schema: obographs_datamodel
#
# id: https://github.com/geneontology/obographs
# description: A data model for graph-oriented representations of ontologies. Each ontology is represented as a Graph, and multiple on... |
91ba0fca7a022a8cf2299b60c9c8c7d58d80d92f2fe3efb2101820d2a25c5067 | Python | 50,371 | 1,139 | #!/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>.
import glob
import os
import sys
import carla
from carla import TrafficLightS... |
62a1ac911b430c140a61f85f5c2a2c6a08d1cf01fc7d8c2b398fba2690f7f996 | Python | 50,496 | 966 | from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from .util import number_color
from functools import partial
import glob
import math
from ui.util import number_object
from ui.mouse_event import ReferenceDialog, SnapshotDialog
import copy
Lb_width = 100
Lb_height = 40
Lb... |
c43337f90b1228a4e81d166807d6221bc01772c05413c4d05cbcde71e1c3081c | Python | 50,719 | 903 | # 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... |
3ba1967f093c40550b9589dbffdeddb929a2b8069449739a0299e880fea9b927 | Python | 50,743 | 1,414 | # Auto generated from summary_statistics_datamodel.yaml by pythongen.py version: 0.9.0
# Generation date: 2023-04-09T15:53:54
# Schema: summary-statistics
#
# id: https://w3id.org/oak/summary_statistics
# description: A datamodel for reports on data
# license: https://creativecommons.org/publicdomain/zero/1.0/
import ... |
3daa54d424b1e7df069b54cab94f014c09f1390288a35478038dd86e4183b250 | Python | 50,778 | 1,391 | import numpy
#from skimage.external.tifffile import TiffFile, TiffWriter
from tifffile import TiffFile, TiffWriter
import skimage.io
import skimage.morphology
import skimage.transform
import random
import json
import tensorflow
from tensorflow import nn
import tensorflow.keras as keras
from tensorflow.keras.utils i... |
96b89fb04b402743690e9dddbbf89e4b6cf685e01a51047e00ae67cb96d91048 | Python | 51,184 | 1,178 | import sys
import datetime
import os.path
import copy
### Package imports
from PySide2 import QtCore, QtGui
from PySide2.QtWidgets import QFileDialog, QApplication, QMainWindow, QGridLayout, QGroupBox, QWidget, QPushButton, QLayout, QDialog, QLabel, QRadioButton, QVBoxLayout, QCheckBox
import numpy as np
import pyqtgr... |
49be90761bd9a9cb1eb0f1b368bf3b9eee004c0ca5786811fcf72dfd75165c07 | Python | 51,677 | 1,400 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
"""Plot univariate data (:class:`~eelbrain.Var` objects)."""
import inspect
from itertools import chain
import logging
from typing import Sequence
import numpy as np
import scipy.linalg
import scipy.stats
import matplotlib.axes
from matplotlib.artist import setp... |
8748ec946ce19613278c9eee1097ddd8faa7f8fc63e9ee29971278bd3e161eca | Python | 51,773 | 1,475 | from builtins import filter
from builtins import zip
from builtins import input
from builtins import next
from builtins import range
from builtins import object
from future.utils import with_metaclass
# ImagingDataset objects must be initialized with a list of
# `iterable <http://docs.python.org/2/glossary.html#term-it... |
89cde866dc1dfa7e7be0075869d0b8d4fb1b9118c0ba8d32c65acd97bfc0ab9f | Python | 51,950 | 1,564 | import math
from copy import deepcopy
import matplotlib.pyplot as plt
from matplotlib import rcParams
import numpy as np
from numpy.linalg import inv
from numpy import nan, NaN
import weave
from .ThresholdModel import ThresholdModel
from .Filter_Rect import Filter_Rect_LogSpaced
from .ModelStimulus import ModelStimul... |
cbf8dc454a4025b9699fb660b6dc13e48c6bf3f606363e9eee3c847e54ddc0bd | Python | 52,030 | 1,221 | import logging
import re
from collections import defaultdict
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any, Dict, Iterable, Iterator, List, Mapping, Optional, Set, Tuple, Union, cast
import pyhornedowl
import rdflib
import sssom_schema as sssom
from kgcl_schema.datamodel impo... |
123a9462caff307478e645577eed8810ded1ee606d0e5e37126cca7e371b8bf4 | Python | 52,083 | 997 | import numpy as np
import torch
import torch.nn as nn
import logging
import pickle
import os
import time
import csv
from pathlib import Path
import gc
from monai.data import write_nifti, NiftiSaver
# from skimage.measure import regionprops
from skimage.segmentation import slic
from datetime import datetime
from captum... |
45fde27113364d409f26a84890691658799c594475045f6427b3609fb16c48c3 | Python | 52,146 | 1,482 | """Maxfiltering.
This module wraps the Elekta Maxfilter command-line tool for applying
Signal Space Separation (SSS) and temporal SSS (tSSS) to MEG data.
Note
----
This module requires a licensed installation of Elekta/MEGIN MaxFilter.
MaxFilter is proprietary software and is not included with osl-dynamics.
**OHBA u... |
efa9c36b6433e043c22b8df21792ffd8e6f7c56c54ae925141a83f9fc5aeeb74 | Python | 52,329 | 1,375 | import os
import sys
import numpy as np
from random import randint
import pyqtgraph as pg
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from .wtiles import QDoubleButton
from .uuuuuu import read_qss_file
eye_button_style = """
border-left: None;
border-right: 1px solid gra... |
fbafa47bdbaec526968d81e8e97a8785cda4edf03775b48fed27e3f39ec6a541 | Python | 52,480 | 1,465 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
from collections import defaultdict
import difflib
from functools import reduce
from glob import glob
from itertools import chain, product
import operator
import os
import re
import shutil
import subprocess
from time import localtime, strftime
import traceback
i... |
4320886ce5d1c1e454765b227abfa366e78de7b7543f65a02668277a0972ebe0 | Python | 52,627 | 1,454 | ####################################################################################################
# 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 ... |
bfddf3a7ad0fb2a06c2d6fe6fee9baee4dbac71dde3de3b0271a1ac770de10ed | Python | 53,504 | 761 | """Number of UKBB variables
"""
from collections import OrderedDict
primary_demographics = OrderedDict([
('31-0.0', 'Gender'),
('21003-2.0', ' Age when attended assessment centre'),
('34-0.0', 'Year of birth'),
('52-0.0', 'Month of birth'),
('21022-0.0', 'Age at recruitment'),
])
lifestyle = Order... |
7769ee03fcc5f7bfac79f2ced2b9f7775b6977b3797a33fc81ed40f646251bbd | Python | 53,633 | 1,306 | import numpy as np
import scipy.interpolate
from scipy.stats import beta
from scipy.interpolate import UnivariateSpline
from scipy.interpolate import interp1d
# What `from pyoxynet import *` and `pyoxynet.<name>` expose: pyoxynet's own names, not numpy,
# pandas or scipy
__all__ = ['PrintHello', 'get_sec', 'normalize'... |
139c35a16f84d714a2cef364ceed6ee8180134b614df513a46b87368a18706b0 | Python | 53,830 | 1,222 | # 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 a... |
ffa0bae67426513ba85061716ccd6c6f8ec8afbd8f760e0e9e36b4dde2760d0a | Python | 53,839 | 1,152 | """
This module provides the `AnalyzeSequences` class and supporting
methods.
"""
import math
import os
from time import time
import warnings
import numpy as np
import pyfaidx
import torch
import torch.nn as nn
from ._common import _pad_sequence
from ._common import _truncate_sequence
from ._common import get_reverse... |
f4d1a10afff14a2f9202f8c43b80c386b9b9a762d592afd269712ccc4f4835dd | Python | 53,848 | 1,017 | import os
from PIL import Image
from dash import dcc, html, Input, Output, State, callback, MATCH
import dash_bootstrap_components as dbc
import RV.constants as c
from RV.callbacks.utils.annotation_utils import get_annotation_label_radioitem
from RV.callbacks.utils.loading_utils import get_file_selection_options
CU... |
2a6d7dbe863930d6bfbc9a8327bfc72a3cd2820cda6825669de432dba5f26e56 | Python | 54,150 | 1,395 | # -*- coding: utf-8 -*-
import time
import numpy as np
import tensorflow as tf
from tensorflow.python.util.deprecation import deprecated
from .. import _logging as logging
from .. import files, iterate, utils, visualize
__all__ = [
'LayersConfig',
'TF_GRAPHKEYS_VARIABLES',
'flatten_reshape',
'clear_la... |
bff38dc7b746b37a84a66a81644b7d7d09c891e6d96b3101da5387b226fc91cd | Python | 54,677 | 1,454 | 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... |
f08f0e64c2ba479715704787660eacf7db4b8622c09412d84c6d9152b36a86ac | Python | 55,046 | 1,024 | # module for processing adjacency matrices in various ways
import pandas as pd
import numpy as np
import csv
from tqdm import tqdm
import matplotlib.pyplot as plt
import seaborn as sns
import pymaid
from tqdm import tqdm
from joblib import Parallel, delayed
class Adjacency_matrix():
def __init__(self, adj, input... |
f00c46741f35a9804d252609696dab01039f9312d824586e1e70c6d8b2a88b0b | Python | 55,300 | 1,360 | import torch
import warnings
from ..layers.fourier_continuation import FCLegendre, FCGram
"""
differentiation.py implements utilities for computing derivatives via finite-differences
and Fourier/spectral differentiation methods
"""
class FiniteDiff:
"""A unified class for computing finite differences in 1D, 2D, ... |
3a9c73ec5ed1100fafd895591f727a671bab97180056e69772c2300d747ae09a | Python | 55,489 | 1,631 | """
Command Line Interface to OAK
-----------------------------
Executed using "runoak" command
"""
# TODO: order commands. See https://stackoverflow.com/questions/47972638/how-can-i-define-the-order-of-click-sub-commands-in-help
import logging
import os
import subprocess
import sys
import re
from collections import d... |
c89f7bf4afe87513e8f88dadd99a3d9a5221f032e0da7cd979ad7daa68cb939b | Python | 55,632 | 1,125 | """
This module is an extended trainer based on the allennlp's default trainer to handle multitask training
A :class:`~allennlp.training.trainer.Trainer` is responsible for training a
:class:`~allennlp.models.model.Model`.
Typically you might create a configuration file specifying the model and
training parameters an... |
3857973bdb8394fe51574d81beaf22edf044703c0af3d2394c01295576438105 | Python | 55,782 | 1,398 | """
Copyright 2020 - by Jerome Tubiana (jertubiana@gmail.com)
All rights reserved
Permission is granted for anyone to copy, use, or modify this
software for any uncommercial purposes, provided this copyright
notice is retained, and note is made of any changes that have
been made. This softwar... |
1a854b4deae97128755f86b6d7187d18a7fbf40b2a769f3bd322c9fdb6eb794b | Python | 55,880 | 1,640 | #!/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.... |
4767cde7634a17bdc4a5d2a1aaaaf0a53d362dd3faec4c64882a15554c4500f6 | Python | 56,016 | 1,468 | #!/usr/bin/env python
# Time-stamp: <2025-09-29 14:57:48 Tao Liu>
import unittest
from MACS3.Signal.PairedEndTrack import PETrackI, PETrackII
from MACS3.Signal.PileupV2 import (pileup_from_LRC,
pileup_from_LRC_centers_as_list,
over_two_pv_array)
fro... |
63e6d166b9b80e6215c0157e2bfd7aa0a991e44e3da6157322345b72086f0016 | Python | 56,206 | 1,569 | import itertools
import logging
from abc import ABC
from collections import defaultdict
from copy import copy
from dataclasses import dataclass, field
from functools import lru_cache
from pathlib import Path
from typing import Any, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Union
import curies
from depr... |
20f56573fd75b9528b9603131eb848fa4062647685e8629f3b0ca7837decf41b | Python | 56,380 | 1,462 | # helper.py
import os, cmath, math, sys, glob, subprocess, re, argparse, shutil, datetime, csv, commands
import numpy as np
import cfg
import pandas as pd
from collections import defaultdict
from operator import itemgetter
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import cm
from optparse... |
77bcc28438ca5d011bc11e77ebcd48a7adf25a2f2738eab0cc34558d1fd33e47 | Python | 56,461 | 1,245 | import numpy as np
import time
import copy
import torch
from torch.utils.data import TensorDataset
def generateWordBank(toy_params):
""" Creates the word bank based on various inputs """
variable_length = toy_params['variable_length'] if 'variable_length' in toy_params else False
if toy_... |
ad1e38fc55cad90e9a1cd1372b7e58f38892f9d0129fbe1130c15d3c676838c2 | Python | 56,483 | 1,245 | import numpy as np
import time
import copy
import torch
from torch.utils.data import TensorDataset
def generate_word_bank(toy_params):
""" Creates the word bank based on various inputs """
variable_length = toy_params['variable_length'] if 'variable_length' in toy_params else False
if to... |
1a58f49d9dc23bf2cc1aa8c4a41cae0d592b5e745c514f90035f51d0a66f78a1 | Python | 56,582 | 917 | import argparse
import sys
import os
import json
import mistune
import collections
from debarcer.preprocess_fastqs import reheader_fastqs, check_library_prep
from debarcer.umi_error_correct import get_umi_families, umi_datafile
from debarcer.generate_consensus import generate_consensus_output
from debarcer.generate_... |
723b20308fc2de119e0ad07d82443a2ab4cc87da5c80692622baad8d1a7ae877 | Python | 57,073 | 1,349 | import os
import torch
import pickle
import collections
import math
import pandas as pd
import numpy as np
import networkx as nx
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import AllChem
from rdkit import DataStructs
from rdkit.Chem.rdMolDescriptors import GetMorganFingerprintAsBitVect
fr... |
225fd007a682ad8d03c6cba4da48e4a205e119feb3cbea722a74b9271dbbc24d | Python | 57,307 | 1,291 | #%%
from pymaid_creds import url, name, password, token
from data_settings import pairs_path, data_date_A1_brain
import pymaid
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from datetime import date
from contools import Promat, Celltype, Celltype_Analyzer
# allows text t... |
77f1adf9c914455fceaecf5efddfb0613d43f2230422380a6fb3826646339df1 | Python | 57,395 | 1,506 | import inspect
import mmcv
import numpy as np
from numpy import random
from mmdet.core import PolygonMasks
from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps
from ..builder import PIPELINES
try:
from imagecorruptions import corrupt
except ImportError:
corrupt = None
try:
import albumentations... |
d6d4087a68e8e839b162ec1a0983bfa6683f75715d125f5404b6fa9a1799721e | Python | 58,023 | 1,160 | """
This module is an extended trainer based on the allennlp's default trainer to handle multitask training
for two auxiliary tasks
A :class:`~allennlp.training.trainer.Trainer` is responsible for training a
:class:`~allennlp.models.model.Model`.
Typically you might create a configuration file specifying the mode... |
ba08eaf5ef639c312d01bde9a35035fd7e354d2570cb9df1951b7af202a16e51 | Python | 58,040 | 1,534 | import os.path as op
import os
import logging
import tempfile
import numpy as np
from scipy.stats import sem
import pandas as pd
from tqdm.auto import tqdm
import AFQ.viz.utils as vut
from AFQ.viz.utils import display_string
from AFQ.utils.stats import contrast_index as calc_contrast_index
from AFQ.data.utils import ... |
4f98316cf5f7ffec716c8ee4367c60655f84bdba14871f034fe9b1ac72b75036 | Python | 58,116 | 1,360 | import os
import sys
import numpy as np
import pyqtgraph as pg
# from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph.functions as fn
import pyqtgraph.opengl as gl
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from .image_stacks import SliceStack
from .slice_stacks import SliceS... |
2e318aa440124624d499ad3b1a29055476d112f1a9fefb259235010d16fb013e | Python | 58,472 | 1,375 | # 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... |
1fcf8e7f9980722f82e2dd7e100a054de9e638defdf1b73a52eef6add550bb79 | Python | 58,851 | 1,240 | """Functions for getting connectivity measures in a labeled array format."""
import warnings
from collections.abc import Hashable, Mapping, Sequence
from dataclasses import dataclass
from logging import getLogger
from typing import Any, Literal
import numpy as np
import xarray as xr
from numpy.typing import DTypeLike... |
f8ed9268a920c37f18df31853a49e67c57a891a2fcadd5e20e1a401a6a3d3472 | Python | 58,956 | 1,304 | __author__ = 'duarte'
"""
========================================================================================================================
Network Architect Module
========================================================================================================================
(incomplete documentation)
... |
a14c33c9e2a1f94bb22b7fb7d9fb684ad103ae2a829a4a905e6ed7e8cfb12446 | Python | 59,125 | 1,171 | '''PyTorch backend for the slideflow.model submodule.'''
import os
import types
import time
import torch
import inspect
import torchvision
import pretrainedmodels
import slideflow as sf
import numpy as np
from os.path import join
from slideflow.util import log
from slideflow.model import base as _base
from slideflow.... |
2b4795980b4b2c7fcb36ac05b601ba6e3c2e90d5818a23783d5d8a433ca450ae | Python | 59,329 | 1,417 | #!/usr/bin/env python
# Time-stamp: <2025-04-11 13:46:05 Tao Liu>
import gzip
import logging
import re
import unittest
import numpy as np
import pytest
from MACS3.IO.Parser import (guess_parser,
StrandFormatError,
GenericParser,
B... |
dbae54b8acb33977631d88db0d06123c2cbcc09d494aa4859b84f6c3ef78deb7 | Python | 59,585 | 964 | #%%
import os
import sys
try:
os.chdir('/Volumes/GoogleDrive/My Drive/python_code/connectome_tools/')
sys.path.append('/Volumes/GoogleDrive/My Drive/python_code/maggot_models/')
sys.path.append('/Volumes/GoogleDrive/My Drive/python_code/connectome_tools/')
except:
pass
from pymaid_creds import url, na... |
856591617930544fee8ef4bbfbc4a415a6b9ccffffcbc79ec313011fe76ef06f | Python | 59,693 | 1,509 | #! /usr/bin/env python
# Copyright 2014 Vimal Manohar
# Apache 2.0
from __future__ import division
import os, glob, argparse, sys, re, time
from argparse import ArgumentParser
use_numpy = True
try:
import numpy as np
except ImportError:
use_numpy = False
# Global stats for analysis taking RTTM file as referenc... |
92b5c43fdcdb93e726098ce44973c78834923cf3f21046070f4b6a791d2a4e97 | Python | 59,708 | 1,509 | #! /usr/bin/env python
# Copyright 2014 Vimal Manohar
# Apache 2.0
from __future__ import division
import os, glob, argparse, sys, re, time
from argparse import ArgumentParser
use_numpy = True
try:
import numpy as np
except ImportError:
use_numpy = False
# Global stats for analysis taking RTTM file as referenc... |
180f70b7a1fbb5f8031b2f46d4da91142902a043bdd9ef59a98a3f52b759f07b | Python | 59,740 | 1,509 | #! /usr/bin/env python
# Copyright 2014 Vimal Manohar
# Apache 2.0
from __future__ import division
import os, glob, argparse, sys, re, time
from argparse import ArgumentParser
use_numpy = True
try:
import numpy as np
except ImportError:
use_numpy = False
# Global stats for analysis taking RTTM file as referenc... |
5061a6548a26726af1f3cb558fec1ca62e6eeaf3b80b2c617b7c8bf65e27d6fa | Python | 60,239 | 1,336 | """Tests for advanced connectivity measures: canonical_coherence, global_coherence, group_delay."""
import numpy as np
import pytest
from spectral_connectivity import Connectivity, Multitaper
from spectral_connectivity.simulate import (
simulate_lagged_broadband,
simulate_shared_oscillation,
)
from tests._bac... |
b97b70fa69bd195fad71f39146ad91304a22d7f1debdcee8fd2c49d9cec86b15 | Python | 60,379 | 1,236 | # -*- coding: utf-8 -*-
"""
@author: Yuxiu Shao
Sparse EI Network, Full-rank Gaussian Network and Rank-one Mixture of Gaussian Approximation
Connectivity, Dynamics
"""
import numpy as np
import matplotlib.pylab as plt
import matplotlib
from numpy import linalg as la
# import seaborn as sb
# from sympy import *
ext... |
abb7dbc17f583e6eaeae243c89a6b0738926c7502962518c8ec3f7565a8c14f0 | Python | 60,387 | 1,542 | #! /usr/bin/python
# -*- coding: utf8 -*-
import tensorflow as tf
import tensorlayer as tl
import numpy as np
import time
import numbers
import random
import os
import re
import sys
import threading
# import Queue # <-- donot work for py3
is_py2 = sys.version[0] == '2'
if is_py2:
import queue as queue
else:
... |
e635c1715c4b25d5eb7427e45455ec7eb4a79e6629a1ecac64a63e463da58b4f | Python | 60,653 | 931 | # Import libraries
import math
import os
import os.path
import numpy as np
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
import pickle
from collections import OrderedDict
from tabulate import tabulate
import mplcursors
from scipy.spatial import distance
from six.moves import input
# fit t... |
2e7d535bc9f996ec2724cf7a4c6303d59e4c570a0c045f18ace50269e3b3adaf | Python | 60,827 | 1,812 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
from copy import deepcopy
from itertools import chain, product
from math import log
from operator import (
add, iadd, sub, isub, mul, imul, pow, ipow, truediv, itruediv, floordiv, ifloordiv, mod, imod)
import os
import pickle
import shutil
from string import ... |
e7717fa0585bdfcfeb6854d1e2c9553fd91400cdb40fe7ec66391bac9ff270b9 | Python | 61,172 | 1,223 | """
File: Gene_pathway_analysis.py
Created: 2020-04-29
Last Changed: 2021-01-08
Author(s): H.H.Wiersma
Code to create distribution plot and a mask image used in the research plan
Copyright (C) 2019 H.H.Wiersma
This program is free software: you can redistribute it and/or modify
it under the terms of t... |
a94883e4f9b6fc1c4a83430bcfc99bc1f9795cfe43999d8f8759779f6898fa13 | Python | 61,201 | 1,812 |
import numpy as np
from numpy import random
from sklearn.metrics import roc_auc_score
from scPrisma.data_gen import simulate_spatial_cyclic
from scPrisma.pre_processing import *
from numba import jit
@jit(nopython=True, parallel=True)
def numba_diagonal(A):
d = np.zeros(A.shape[0])
for i in range(A.shape[0]... |
a1cb498aa2956f15d13e6d2a96e20b36c51f60206ff982f87b7962a423b89a63 | Python | 61,209 | 1,594 |
# 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 o... |
a46918fa09235de043d7bc3f7194c93733edfeb37f0bdbedac27d6cc49ceafc8 | Python | 61,822 | 742 | #%%
from pymaid_creds import url, name, password, token
import pymaid
rm = pymaid.CatmaidInstance(url, token, name, password)
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
import numpy.random as random
import gzip
import csv
import connectome_tools.celltype as ct
import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.