sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
13e960378470117b4a21b28fbcfb45020a7ce4c18dc2e773f4d540443d1f9f30 | Python | 65,702 | 2,030 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 12 10:08:16 2016
@author: Alban Siffer
@company: Amossys
@license: GNU GPLv3
"""
from math import log, floor
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import tqdm
from scipy.optimize import minimize
# colors for plot... |
b348c60b5930c0c58815e735c8829952f6eae20ea9019db787b3ac99b9769809 | Python | 65,773 | 1,948 | # coding=utf-8
# Copyright 2026 The Google Research Authors.
#
# 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 applicab... |
cca5b2708269d87fea4b64dbca43822a6340d271c7bfc7338d7ba7dc15c14211 | Python | 65,866 | 1,566 | # coding=utf-8
# Copyright 2020-present Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
#
# 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.a... |
3ff2db7668285c49f6286190384e03e790e31d71dc7523284305e61b538d228d | Python | 65,922 | 960 | import multiprocessing
# import os
import time
from warnings import warn
import math
import numba
import numpy as np
import pandas as pd
import pymp
# from SALib.sample import saltelli
# from SALib.analyze import sobol
from SALib import ProblemSpec
from pyDOE import lhs
from scipy.stats.distributions import norm
import... |
38e9dfcce4bdcb20ff86291e2e734e166073cec5efdfa0aee2573d0c9c26a60c | Python | 66,103 | 1,437 | options = dict(
verbose=True,
model_extensions=[
'h2o.model.extensions.ScoringHistoryDL',
'h2o.model.extensions.VariableImportance',
'h2o.model.extensions.Fairness',
'h2o.model.extensions.Contributions',
],
)
def module_extensions():
class H2OAutoEncoderEstimator(H2ODee... |
5e2673a39f7a6c467949abdb03ee6fe784e6c5194a5556643722dfe515d8136b | Python | 66,200 | 1,593 | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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... |
df574f5e7dd17dab74c592de568169ba78b285eeafb1b97dfd037ea9df4b8659 | Python | 66,262 | 1,932 | #
# Copyright (C) 2012-2021 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import codecs
from collections import deque
import contextlib
import csv
from glob import iglob as std_iglob
import io
import json
import logging
import os
import py_compile
import re
import socket
try:
import ssl
... |
61723d3cfc9b4b8b3e74c7363e368499c53b012c5a6cbb396b684cb3e8502c1c | Python | 66,452 | 1,640 | """Evaluation of cumulative incidence predictions for competing risks."""
from __future__ import annotations
from typing import Any
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import trapezoid
from scipy.interpolate import PchipInterpolator
from SurvivalEVAL.evaluations.calibration impor... |
95c9b350447dfbfc84a6684556c211f6abe44f3abc2712c21e853257e23694f8 | Python | 66,511 | 1,608 | import os
import sys
#stderr = sys.stderr
#sys.stderr = open(os.devnull, 'w')
import tensorflow as tf
K = tf.keras.backend
# Pylance complains about all these imports b/c apparently TF uses dynamic behavior to import keras -- ALT, 2023-03-31
# See: https://github.com/microsoft/pylance-release/issues/3387
# from tf.k... |
ad31ed12553e060ce80bf630b07b4c24bc0718702f8308e8a9fe9d1f1daf7c82 | Python | 66,710 | 1,753 | # movies.py
# KMB 11/06/2008
import multiprocessing
import os
import struct
import traceback
import importlib
import glob
import cv2
import numpy as num
# import wx
from params import params
import logging
# from ellipsesk import annotate_bmp
# version of sbfmf for writing
__version__ = "0.3b"
#import static_backg... |
ed9da3aa3edfdadf0174c01e6d1d76766c73a3ce1b1a50fb3a49477b83a14320 | Python | 66,816 | 1,847 | #!/usr/bin/env python3
# ******************************************
#
# SHARC Program Suite
#
# Copyright (c) 2023 University of Vienna
#
# This file is part of SHARC.
#
# SHARC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... |
1ec313da5ac7dd3a5c0870ad932be8a45a33733080e60f82d2a7432f2c52125a | Python | 67,109 | 1,694 | from sklearn.metrics import average_precision_score, accuracy_score, f1_score,roc_auc_score
from sklearn import metrics
from sklearn.calibration import CalibratedClassifierCV
from sklearn.linear_model import LogisticRegression
import numpy as np
from matplotlib import pyplot as plt
import matplotlib.patches as mpatches... |
9cc1c3d455dc37c9175cf7863506e3c6e2819bdb9f9d19471a0f27a2f0575df3 | Python | 67,259 | 1,387 | # New matplotlib colormaps by Nathaniel J. Smith, Stefan van der Walt,
# and (in the case of viridis) Eric Firing.
#
# This file and the colormaps in it are released under the CC0 license /
# public domain dedication. We would appreciate credit if you use or
# redistribute these colormaps, but do not impose any legal r... |
ca12c4d1a26a05d200de38b54db3405f99bb1847f02d2272e2d5eb03b39969df | Python | 67,310 | 1,630 | # coding=utf-8
# Copyright 2019 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# 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... |
ca4e5474c9cb51a6850c0db27b85ccc2ab3060d6aa31cb49791e7b9527196637 | Python | 67,539 | 1,456 | # coding=utf-8
# Copyright 2021 The Fairseq Authors and The HuggingFace Inc. team. 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/... |
9889b7ec12239e1367d032697135e87ebd03ffee830dbbe7096013bf6a41f2c6 | Python | 67,545 | 1,504 | import warnings
import numpy as np
from numpy.typing import NDArray
from scipy.stats import beta, norm
from sklearn.base import BaseEstimator, ClassifierMixin, clone
from sklearn.linear_model import LinearRegression
from sklearn.utils.validation import check_is_fitted
import pyntbci.classifiers
from pyntbci.utilities... |
027b64a136cc0850e47961ea2669570deecb103f58e66e6f03ccc6a3c263db51 | Python | 67,791 | 1,487 | import PoseCommon_dataset as PoseCommon
import PoseTools
import tensorflow
tf = tensorflow.compat.v1
# from batch_norm import batch_norm_mine_old as batch_norm
# from tensorflow.compat.v1.layers import batch_normalization as batch_norm_temp
batch_norm_temp = tensorflow.compat.v1.layers.BatchNormalization
def batch_norm... |
6dc25cc49418d33b7d99498ac29d0697acc96eeb2e59ee19e77b2a798cda1135 | Python | 67,813 | 1,623 | """
Set of classes for dealing with a STAR files (Relion's format)
# Author: Antonio Martinez-Sanchez (Max Planck Institute for Biochemistry)
# Date: 1.06.16
"""
__author__ = 'Antonio Martinez-Sanchez'
import gc
import sys
import csv
import copy
import pyto
import errno
from pyseg.globals import *
from pyseg import ... |
e7237d7b75e6445546362bb939d2c2a0a28ec29e9851ce1483f303bc2df5ab72 | Python | 67,838 | 1,996 | import numpy as np
import matplotlib.pyplot as plt
import pickle
from os.path import join
from matplotlib.style import use
from preprocess import (
load_sub,
apply_preprocessing,
)
from help_funcs import load_exp_variables, vis_permutation_cluster_test
use("default")
# ----- #
def itr_tr(score, time, class... |
1e1da70cb4f952896c6af18fcf5fb60b9bb2648618962c4f30a77fe3a244cfa4 | Python | 68,074 | 1,695 | # -*- coding: utf-8 -*-
#
# Test spectral estimation methods
#
# Builtin/3rd party package imports
import inspect
import random
import psutil
import pytest
import numpy as np
import scipy.signal as scisig
import dask.distributed as dd
# Local imports
from syncopy.tests.misc import generate_artificial_data, flush_loca... |
5198aee73652bc474515ad243249a5910732bdba0217708507590646f6124bcc | Python | 68,395 | 1,302 | import json
import math
import os
import shutil
import tempfile
import unittest
from unittest.mock import patch
from urllib.error import URLError
from semantic_version import Version
from hed import schema
from hed.errors import HedExceptions, HedFileError
from hed.errors.error_types import SchemaErrors
from hed.sche... |
933e7927c3d1a78e28b22e717787102d5ff9316ca0fc97bb91802ecf1418ca71 | Python | 68,398 | 959 | from neuron import h, rxd
import numpy as np
import time
import scipy.io
import sys
import re
import os
import matplotlib.pyplot as plt
h.load_file('stdrun.hoc')
dend = h.Section(name='dend')
dend.L=1
dend.diam=0.79788
cyt = rxd.Region([dend], name='cyt', nrn_region='i')
my_volume = 0.50000*1e-15 #litres... |
0d3999a64baaebdb9a1ad9e4e4571f6590d21ec7e155b0e258d54c8a899a14fe | Python | 68,425 | 1,402 | import os
import string
import warnings
from collections import defaultdict
from rdkit import Chem
import torch
from torch_scatter import scatter_add, scatter_max, scatter_min
from torchdrug import utils
from torchdrug.data import Molecule, PackedMolecule, Dictionary, feature
from torchdrug.core import Registry as R
... |
cb469dddffe2e2dbac71043cba405227c3f6315a5f33fe3289656d3482bc2192 | Python | 68,493 | 1,668 | import traceback, sklearn
from collections import OrderedDict
from typing import Iterable
from copy import deepcopy
import matplotlib
from matplotlib.ticker import LinearLocator
from scipy.stats import chi2_contingency
from sklearn.calibration import calibration_curve
from sklearn.metrics import confusion_matrix, f1_s... |
00fcfca976b3d0fabb6c11ed2021a12276e56481b7d932f01304141e99af443c | Python | 68,533 | 1,820 | """
Unified napari visualization module for XuLab-RegTools.
Provides a reusable ``NapariViewer`` class and convenience helpers that can
be shared across all regtools (registration, cell counting, cellpose,
stitching, NIfTI creation, etc.).
Features
--------
- Lazy napari import (fast startup when not visuali... |
af5462680287da9a8c6a5eb0f130b823d659551b229950d865a5a99b775c3a5f | Python | 68,874 | 2,101 | from __future__ import annotations
from importlib import util
from pathlib import Path
import numpy as np
import pytest
from ase.build import bulk, molecule
from monty.shutil import copy_r
from quacc import change_settings
from quacc.recipes.vasp.core import (
ase_relax_job,
double_relax_flow,
freq_job,
... |
fc57d68b41c5f9313dd5589ea8aae8e36fcdf86fecee5c9cafe7160a0a9e21ed | Python | 69,058 | 1,656 | """
Burst dictionary creation and dimensionality reduction of
burst waveforms.
"""
import numpy as np
from os.path import join
from sklearn.preprocessing import RobustScaler
from sklearn.decomposition import PCA
from mne.decoding import CSP as CSP
from scipy.fft import rfft, rfftfreq
from scipy.signal import find_pea... |
002f371e678edcd6f5d613662e4acc1bb095fd2ce82ea92cbc9a91d8b1b42db7 | Python | 69,319 | 1,461 | # coding=utf-8
# Copyright 2021 The Facebook, Inc and The HuggingFace Inc. team. 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/LI... |
29fcbbb60c6e1d0e68fcff538134da53796ec6072f146711133df4f50d7bff72 | Python | 69,349 | 1,346 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import os
import pickle
import numpy as np
import pandas as pd
from typeI_analysis import mae, rmse, barplot_with_CI_err... |
ab243fa728d979cfbae92838affbe59293e1a0ae30b796d989394582211c4b79 | Python | 69,385 | 1,716 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Defines classes and methods used for recurrent neuronal networks.
Copyright (C) 2012 Computational Neuroscience Group, NMBU.
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 Fr... |
69ecb249ff8d1ac6c82079d3b422f1be290cb3cb00575a437a383cc3052ef491 | Python | 69,496 | 1,479 | # coding=utf-8
# Copyright 2021 The Marian Team Authors and The HuggingFace Inc. team. 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/licen... |
dd490b80fa0e1c392d104b62ab2e2302eb50b8c348b45d7c68eeb74a42ef7e88 | Python | 69,607 | 2,016 | import numpy as np
import numba
from ...utils import model_utils as mu
def timeIntegration(params):
"""Sets up the parameters for time integration
Return:
rates_exc: N*L array : containing the exc. neuron rates in kHz time series of the N nodes
rates_inh: N*L array : containing the inh. ne... |
b65e1a65e80ebcc9b60cc082f16f1ce493ac19654b7b4be9d248e5c491eaf0c7 | Python | 69,625 | 1,623 | from __future__ import annotations
import math
import warnings
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Literal, NamedTuple, cast
import numpy as np
import pandas as pd
from fast_array_utils.conv import to_dense
from numba import jit, prange
from pandas import Series
from rich.progress im... |
4c967e2c698b01a5a2252c69c5d00b2f60d65768e3461e69be2f02ad7173da6c | Python | 69,652 | 1,591 | import time
import openturns as ot
import openturns.viewer as viewer
import seaborn as sns
ot.Log.Show(ot.Log.NONE)
import numpy as np
from sklearn.neighbors import KernelDensity
import uptake.metamodel_implementation.ANN.utils as ANN_miu
import uptake.metamodel_implementation.utils as miu
from uptake.fi... |
43ecfa13858060b9e1bb733d6cf157164cbbf0ce3193bde7136763bef3a371db | Python | 69,690 | 1,749 | # interactive wave display module
import matplotlib as mpl
import matplotlib.pyplot as mp
import numpy as np
import channel
from pyclamp.dsp.fpfunc import *
from pyclamp.dsp.fpanal import *
from pyclamp.dsp.lsfunc import *
from pyclamp.dsp.strfunc import *
from pyclamp.dsp.sifunc import *
from pyclamp.dsp.wffunc impor... |
b6fc26bcf675ee351f1931a6b6afb42dd1752173e6ae76155f30204b9b4f3517 | Python | 69,782 | 1,558 | '''
Classes for generating organization models of particles and filaments in tomograms
'''
import os
import gc
import sys
import vtk
import abc
import math
import time
import random
import shutil
import numpy as np
import scipy as sp
import ctypes
import multiprocessing as mp
import pyto
from pyorg import pexceptions... |
46b8b81ce744e6101c2698f7475f1c32691b2181f23fde03380e8b821b402aad | Python | 69,882 | 1,477 | # coding=utf-8
# Copyright 2021 The Fairseq Authors and The HuggingFace Inc. team. 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/... |
1949cb3eb65193ebdd4eae7a4b35148e34887ef048680a7d55d0e7d2f0769499 | Python | 69,933 | 1,576 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors, The HuggingFace Inc. team, and the
# Lxmert Authors.
# Copyright (c) 2018, NVIDIA CORPORATION. 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.... |
8af2c2dae8be234b4acd71e42e67de9ded8f96f4c7fc552649a0f7e75043f1a4 | Python | 70,174 | 1,618 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import os
import glob
import io
import collections
import pickle
import pandas as pd
import numpy as np
import seaborn ... |
03088fb892a8a0e745679a163d2321006a36919ec5e88bdb80fab29183c03c8b | Python | 70,304 | 1,477 | import PoseUNet_dataset as PoseUNet
import PoseUMDN_dataset as PoseUMDN
import PoseCommon_dataset as PoseCommon
import convNetBase as CNB
import PoseTools
import sys
import os
import contextlib
# Assume TF==2.x.x
import tensorflow
tf = tensorflow.compat.v1
#from tensorflow.compat.v1.layers import BatchNormalization as ... |
5d490f3e8206bd879cc3b8039558d5c4aca9f8c0df1981ab9c91211e4c6062f8 | Python | 70,406 | 1,486 | # coding=utf-8
# Copyright 2021 The Facebook, Inc and The HuggingFace Inc. team. 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/LI... |
e58b1d127fd754a78ed9aeeb1028e13e2b3ddf5e72ec2a3b81625363fc2965ec | Python | 70,463 | 1,492 | # coding=utf-8
# Copyright 2021, Google Inc. and The HuggingFace Inc. team. 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... |
16345c536131fa5e4f5695a4164c04850c9ba3e1b5171b9f780644277d067c27 | Python | 70,553 | 1,133 | """Single frozen transformer, two independent chats, and measured reservoir activity.
The engine is owned by one worker. Its lock also serializes direct API calls; only
Telemetry.snapshot and a cancellation Event need to be accessed from the UI.
"""
from __future__ import annotations
import gc
import json
import time... |
0015fef60f867f3f2f8a3e134c62b687835faab95e6ff7249879ed90e857cdc0 | Python | 70,741 | 3,028 | from __future__ import annotations
# MG_RESUME_DRC_V1
import hashlib
import pickle
from dataclasses import fields as dataclass_fields, is_dataclass
from ..checkpoint import (
CheckpointJournal,
atomic_write_bytes,
fingerprint,
source_digest,
)
from ..plots.style import morphology_state_rgb
from data... |
7f8b136aca8491edf52829433058ac45f5ec09313744dcbdea8565c6a07d4b85 | Python | 71,391 | 1,580 | #============================================================
#
# Deep Learning BLW Filtering
# Deep Learning models
#
# author: Francisco Perdigon Romero, Wesley Chorney, and Ahmed Shaheen
# email: ahmed.shaheen@oulu.fi
# github id: AhmedAShaheen
#
#===========================================================
imp... |
fea294621b157ccd4fed1bce1d4a15d45e2d3f6d51640576ab7b018dad21fcd5 | Python | 71,484 | 1,872 | """
Defines class Observations that can hold data form one or more observations
(experiments).
# Author: Vladan Lucic (Max Planck Institute for Biochemistry)
# $Id$
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from builtins import zip
from builtin... |
e2e26df0223b68bc2cf45ca8cd6334587975c5b96e2a5a03d32a15b720488f06 | Python | 71,553 | 1,577 | from dreamcoder.enumeration import *
from dreamcoder.grammar import *
# luke
import gc
try:
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torch.nn.utils.rnn import pack_padded_sequence
except:
eprint("WARNING: Could not import torc... |
478e83d2369dc62e72487a8fb4534e6f090ee6e95772c67c8e60777034eb9df2 | Python | 71,600 | 1,619 | """
Performs Univariate 2nd order analysis to a SetListTomograms object by tomograms
Input: - A STAR file with a set of ListTomoParticles pickles (SetListTomograms object input)
Output: - Plots by tomograms:
+ Number of particles by list
+ Particles densities by list
... |
10e95863ffc4e6f9523e6e30c151b61888ba798e38bd5f591c1c92c70f03ce62 | Python | 72,014 | 2,015 | from __future__ import division
from __future__ import print_function
# coding: utf-8
# In[ ]:
#from past.builtins import cmp
from builtins import range
#from past.utils import old_div
from operator import floordiv as old_div
import numpy as np
import scipy, re
import math, h5py
# import caffe
from scipy import misc... |
29d123ec04bd40c65362e6a7c0fecb378e90cf80a25fc770d92d33e2ed7fc686 | Python | 72,100 | 1,552 | # coding=utf-8
# Copyright 2021 The Marian Team Authors and The HuggingFace Inc. team. 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/licen... |
7e195bd9105b869b61fd52cb8959f7f1b21dfc8285811064c45d7dfda245f41c | Python | 72,154 | 1,555 | # coding=utf-8
# Copyright 2021, Google and The HuggingFace Inc. team. 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
... |
907ed580f5bdb77c3c867177105f0b6782b4960a32b8866f21565e245fd86b0c | Python | 72,167 | 1,538 | # coding=utf-8
# Copyright 2021 The Facebook, Inc. and The HuggingFace Inc. team. 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/L... |
1edb38aff650f2271fb4633b82404f7840f9972552bf869f7c5817604e80a74e | Python | 72,281 | 559 | # Automatically generated by scripts/gen_mapfiles.py.
# DO NOT EDIT BY HAND; run `tox -e mapfiles` instead.
LEXERS = {
'ABAPLexer': ('pip._vendor.pygments.lexers.business', 'ABAP', ('abap',), ('*.abap', '*.ABAP'), ('text/x-abap',)),
'AMDGPULexer': ('pip._vendor.pygments.lexers.amdgpu', 'AMDGPU', ('amdgpu',), (... |
dd5dc412b2972864816a0c1285061092966b650c811a7d02ae9306ab13d3373e | Python | 72,622 | 1,589 | import warnings
from statistics import mean
from .enums.nbo_type import NboType
from .enums.edge_type import EdgeType
from .nbo_data_point import NboDataPoint
from .enums.sopa_edge_feature import SopaEdgeFeature
from .node import Node
from .edge import Edge
from .graph import Graph
from .qm_data import QmData
from .e... |
3e561a0c3a71c4be7711b1e8c7534420a0b9f01e7f9fa329592868eb363679fa | Python | 72,628 | 1,558 | """
Find columns on synapse tomograms (ListTomograms) and measure their statistics.
Files for columns visualization in VTK format.
Input: - 3 STAR files (layers) with the ListTomoParticles pickles
Output: - Plots by tomograms and globally:
+ Number of columns
+ Column... |
9748c684416f90bedea512d593f5367d8b440ff095e330cf3f464d5c41976d37 | Python | 72,630 | 1,085 | """This script visualises the results from the inference of repolarisation properties from the T wave"""
import os
import sys
from warnings import warn
import math
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from datetime import datetime
from translate_QT_personalisation_to_MonoAlg3D im... |
b7f83a93adc3cc3e59c315e330bc27fc0f683605a8b6aa661a9d14143ac739b9 | Python | 72,860 | 1,603 | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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... |
0cf5749345d391331b62bad64375cac7f082133dbc79084a0a499988b8c969b1 | Python | 72,877 | 1,100 | # this script, together with the lib process_mouse_trials_lib
# is used to process the raw excel files that have the tracking
# of the mouse in the arena looking for the hidden food
#
# the experiments were originally performed by Kelly Xu from Len Maler lab
#
# the original excel files are not going to be included in ... |
bc1dc36f5329b785a95f372783142c2f1e513bf39f07f07a23acb457b5c1dd22 | Python | 72,993 | 1,651 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2023.1.2),
on January 05, 2024, at 17:12
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Linde... |
a1d946514c3b94b01699fa558f80bb4e8cf8cfe5869a486671c53f279a449dd4 | Python | 72,995 | 2,016 | __author__ = 'martinez'
import csv
import pyseg
import shutil
import numpy as np
import vtk
import math
import graph_tool.all as gt
from .variables import *
import scipy as sp
import matplotlib.pylab as plt
import random as rnd
try:
from vtk_ext import *
except:
from pyseg.vtk_ext import *
from vtk.util import... |
9fb917b42358bda369787a450334c9268cc8b3982314d74428714630c65afc09 | Python | 73,110 | 1,377 | """
Performs Univariate 1st order analysis to a SetListTomograms object by tomograms
Input: - A STAR file with a set of ListTomoParticles pickles (SetListTomograms object input)
Output: - Plots by tomograms:
+ Plots by list:
* Univariate 1st order analysis against ran... |
fcab8a55b060ee67d11a03ef11b59f050883d1b70e34dc418201c51e36eae7bf | Python | 73,117 | 2,012 | from __future__ import division
"""
PyProcess
@author: Cameron Davidson-Pilon
"""
import numpy as np
import scipy as sp
import scipy.stats as stats
from scipy.special import gammainc
import warnings
import matplotlib.pyplot as plt
import pdb
np.seterr( divide="raise")
#TODO change all generate_ to sample_
class ... |
bca6e1d3f3c13ba086b6872b4b8269369571fa4bbc70e6ff754014cc3c35e28d | Python | 73,182 | 1,563 | # coding=utf-8
# Copyright 2021 The Facebook, Inc. and The HuggingFace Inc. team. 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/L... |
a89b4c6cbf3d7b700caf291e64e860548b3e4793b56ad3ae06f609aea28ba9de | Python | 73,194 | 22 | MYSTRING=[ \
"[48;2;255;255;255m[38;2;255;255;255m▀[00m[48;2;255;255;255m[38;2;255;255;255m▀[00m[48;2;255;255;255m[38;2;255;255;255m▀[00m[48;2;255;255;255m[38;2;255;255;255m▀[00m[48;2;255;255;255m[38;2;255;255;255m▀[00m[48;2;255;255;255m[38;2;255;255;255m▀[00m[48;2;255;255;255m[38;2;255;255;255m▀[0... |
49b3bdeb0d946b71352a18b7051268e6ca31c9d2fc8b0930e7608e92ca058a7a | Python | 73,214 | 3,012 | # This file is autogenerated by the command `make fix-copies`, do not edit.
from ..file_utils import requires_backends
class PyTorchBenchmark:
def __init__(self, *args, **kwargs):
requires_backends(self, ["torch"])
class PyTorchBenchmarkArguments:
def __init__(self, *args, **kwargs):
require... |
b4b9def5657788567d50f8a6ae74e66fc6605f27aa367ffd648a5245a2e0f192 | Python | 73,487 | 2,135 | """
Provides class Hiarrchy for the analysis of multiple segementations orgainized
in a hierarchy (each segmentation is a subset of the next one).
# Author: Vladan Lucic (Max Planck Institute for Biochemistry)
# $Id$
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ i... |
c21289d0cacf742cedea1cdee514767b30a61dcc991149e558459b05fd5d3108 | Python | 73,518 | 1,604 | # coding=utf-8
# Copyright 2020 T5 Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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
#
# ... |
8be929280ddfb1df373e19ca3df5cb0fc5dd1aaac1d494fc579f46e832f02647 | Python | 73,683 | 1,663 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2023.1.3),
on June 05, 2024, at 16:21
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv... |
77b2b6919f79d661759d57277ff4e193f6c9a08bc087440bd29acd5cfb1bfce2 | Python | 73,769 | 2,019 | # -*- coding: utf-8 -*-
"""Widgets containing notes (such as markers, events, and stages).
- bookmarks are unique (might have the same text), are not mutually
exclusive, have variable duration
- events are not unique, are not mutually exclusive, have variable duration
- stages are not unique, are mutually e... |
3d276eff64c92791d55c289515dcd6d1665cad9dd88aaf0ef2730884beb7fee4 | Python | 73,939 | 1,399 | ################################################################################
# Import, Set up MPI Variables, Load Necessary Files
################################################################################
import os
from os.path import join
import sys
import matplotlib
import matplotlib.pyplot as plt
from matp... |
f8173dc6e20dcaf4231f1568f7fb13e383a0686ca9b6e9dc4114ec02dc7d9bba | Python | 73,953 | 1,619 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 22 13:20:25 2019
@author: hannekevandijk
copyright: Research Institute Brainclinics, Nijmegen, the Netherlands
name: autopreprocessing.py
version: 1.0
log:
10/12/2020 hanneke: cleaned code for beta-testing
07/11/2020 hanneke: added corre... |
208a6fab777eec2b28d521a3759f1038e8c167595ea0f3a509757f071c4c7e38 | Python | 74,226 | 1,733 | # SPDX-FileCopyrightText: 2024 Blue Brain Project / EPFL
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Network analysis functions based on topological constructions
#
# Author(s): D. Egas Santander, M. Santoro, JP. Smith, V. Sood
# Last modified: 03/2023
#TODO unweighted: convex hull, combinatorial ricci,
#TODO we... |
5c2bffff961172d582955867cf37bdf717fff8f320c20335feab50324ba292a9 | Python | 74,693 | 1,552 | import copy
import logging
import warnings
from collections import defaultdict
from tqdm import tqdm
import torch
import torch.nn.functional as F
from torch import nn
from torch_scatter import scatter_add, scatter_max
from torch_scatter.composite import scatter_log_softmax, scatter_softmax
from torchdrug import core... |
917b3ea7c1ddd7fba2a4f21ba91040ae034c8508488af2100dd750de6b5522f4 | Python | 74,713 | 1,575 | """
Find columns on synapse tomograms (ListTomograms) and measure their statistics.
Files for columns visualization in VTK format.
Input: - 3 STAR files (layers) with the ListTomoParticles pickles
Output: - Plots by tomograms and globally:
+ Number of columns
+ Column... |
8c5cbaf05228275050bdb3ec18f7276693aa0bb28a00057ac1ece22114213fa7 | Python | 74,747 | 1,063 | import torch
from torch.nn import functional as F
from torch_scatter import scatter_sum, scatter_mean, scatter_add
from torchdrug import core, tasks, layers, models, metrics, data
from torchdrug.data import constant
from torchdrug.layers import functional
from torchdrug.core import Registry as R
from torchdrug.models ... |
2d8584ab84b1f092f5fcce6e5fabd60bf341c0fd8e64d327886e39ec54483eb7 | Python | 74,781 | 1,646 | # -*- coding: utf-8 -*-
import inspect
import tensorflow as tf
from .. import _logging as logging
from .core import *
__all__ = [
'RNNLayer',
'BiRNNLayer',
'ConvRNNCell',
'BasicConvLSTMCell',
'ConvLSTMLayer',
'advanced_indexing_op',
'retrieve_seq_length_op',
'retrieve_seq_length_op2'... |
b5564a026cc9354cbe7250da06a612f2a3a2951ec6c41c3d61550488f67bf5db | Python | 74,807 | 1,655 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import os
import glob
import io
import collections
import pickle
import pandas as pd
import numpy as np
import seaborn a... |
3e512800dc5c9a6f789a41b82c4294c9f71ace853f191f8b33d8a8f41462e4a3 | Python | 74,990 | 1,647 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import os
import glob
import io
import collections
import pickle
import pandas as pd
import numpy as np
import seaborn ... |
226ea99ea23273d9392aa3d35d48a753b33e77767308663755ed654adb6c5584 | Python | 75,101 | 1,061 | import torch
from torch.nn import functional as F
from torch_scatter import scatter_sum, scatter_mean, scatter_add
from torchdrug import core, tasks, layers, models, metrics, data
from torchdrug.data import constant
from torchdrug.layers import functional
from torchdrug.core import Registry as R
from torchdrug.models ... |
e1931bb8bc9634dcbc67e734784f83541e7a0f07377124f0095551cf44f1e7a2 | Python | 75,296 | 1,650 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import os
import glob
import io
import collections
import pickle
import pandas as pd
import numpy as np
import seaborn a... |
78b874e51590f87aefd494f9fb3d7dc3a61b18f2fbd6ea9ebc4b3f61776f9782 | Python | 75,875 | 1,837 | """Integration: registration tab embeds the preview panel in a splitter and
refreshes the atlas pane when a template is set."""
import os
import sys
import time
import numpy as np
import pytest
os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
nib = pytest.importorskip("nibabel")
@pytest.fixture(... |
e0ae6da3db249f46076bd1406ae2bfeb0ef7b08c76f25a2e471741708c6a083c | Python | 75,883 | 1,671 | from __future__ import unicode_literals, absolute_import
from builtins import map
import sys
import argparse
if sys.version_info[0] > 2:
unicode = str
from ._default_parameters import (
SEG_PARAMS_TABLE, ALGN_PARAMS_TABLE, LLR_THRESH, SAMP_COMP_THRESH,
DE_NOVO_THRESH, ALTERNATE_MODELS, MAX_SCALING_ITERS... |
49bf271b8f9efd236747455d160229eb42556527919593564e445b7345b6dbec | Python | 76,114 | 1,724 |
""" Authored by: Neel Kanwal (neel.kanwal0@gmail.com)"""
# This file provides helpful functions for preprocessing, training, inference and post-processing.
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
# Ignore all FutureWarning warnings that might flood the console log
warni... |
415e6d32a3b6a656c5ba287fe4672f7dac58632f777ffe9011ca9589a3583770 | Python | 76,126 | 1,673 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import os
import glob
import io
import collections
import pickle
import pandas as pd
import numpy as np
import seaborn a... |
8a842fde2614da248d2f2bf6a92a6fd76f2e4f01de9c1867e0c295977c3bb7e6 | Python | 76,192 | 1,277 | import math
from warnings import warn
import numpy as np
from postprocess_functions import scatter_visualise_point_cloud
from utils import get_nan_value, map_indexes, check_vc_field_ranges, normalise_field_to_range, get_vc_ab_cut_name, \
get_vc_rt_name, get_apex_ab_cut_value, get_endo_fast_and_purkinje_max_ab_cut_... |
f30c925340754ef4819cc15b62d0857935a654d122f179f757af89a3dd42cc70 | Python | 76,232 | 2,404 | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 6 00:21:15 2020
@author: Xingyan Liu
Functions for handling AnnData:
* I/O functions
* preprocessing
- normalization / z-scoring / ...
- groups / ...
* statistics computation
"""
import logging
import os
from pathlib import Path
from typing ... |
367f6586b1897f9096e681743f59f4412c32a07f216c94252746af8af2aa58d6 | Python | 76,316 | 1,721 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... |
e06b2b37e22c16210e1ec758818f1003702c7d1e95108162983799903a2ff2b4 | Python | 76,417 | 1,430 | #code written by Brittany C. Haas and Melissa A. Hardy (adapted from David B. Vogt's get_properties_pandas.py, adapted from Tobias Gensch)
import re
import math
from typing import List
import numpy as np
import pandas as pd
from pandas import DataFrame
from morfeus import Sterimol
from morfeus import BuriedVolume
... |
42a95a7b7fdc8abc186173df5d34c86c4fecba732552472f5cc29ea32ac00a38 | Python | 76,432 | 1,633 | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2016 Peter Foster <pyitlib@gmx.us>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without l... |
9ca2ec1e64666e11229906231d891f78e2a15e2fb30d5e0d2a8083f49261040f | Python | 76,484 | 1,815 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... |
946744bfc1081f666004b40a9cc6a0fe63d4b275b27977e2803920a5c5f9773d | Python | 76,727 | 1,227 | import multiprocessing
import os
from warnings import warn
import math
import matplotlib.pyplot as plt
import numba
import numpy as np
import pymp
from ecg_functions import calculate_ecg_augmented_biomarker_from_only_ecg, calculate_r_s_sr_rs_wave_progression, \
calculate_qrs_width_population, calculate_ecg_qrs_ax... |
06e3fcd10299f48dac9bd10b49723bbd236b8c7e61d672369ea1f35d5366456e | Python | 77,031 | 1,433 | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 3 09:54:29 2021
@author: Dalton
"""
import pickle
import dill
import pandas as pd
import numpy as np
import os
import glob
import re
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
from statsmodels.stats.weightstats import DescrS... |
aad87d9c0caac64d71173a1561bd874760e809589c65e6d2b9a813ce1669bfdb | Python | 77,132 | 2,034 | """Classes for parameters, species, compartments, reactions, fluxes, and forms.
Model class contains functions to efficiently solve a system.
"""
import dataclasses
import logging
import numbers
from collections import OrderedDict as odict
from dataclasses import dataclass
from enum import Enum
from pprint import pform... |
966f42c847257bda6ff52d570f7c555e13336e99ef78cd16555baf0a45201974 | Python | 77,217 | 1,703 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import os
import glob
import io
import collections
import pickle
import pandas as pd
import numpy as np
import seaborn a... |
7217951789671941e747d375053c3f2e5bfe1273c265ee31294ec5993b82575c | Python | 77,332 | 1,401 | #code written by Brittany C. Haas and Melissa A. Hardy (adapted from David B. Vogt's get_properties_pandas.py, adapted from Tobias Gensch)
import pandas as pd
import numpy as np
import re
import math
from morfeus import Sterimol
from morfeus import BuriedVolume
from morfeus import Pyramidalization
from morfeus import ... |
a045d3d600be9de8626d420da3780bfacd4d0f62903e56600a0e471a17e03816 | Python | 77,384 | 1,814 | # coding=utf-8
# Copyright 2026 The Google Research Authors.
#
# 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 applicab... |
bd4c288604ccb0403f7b0bf33d9654d039a9e31e359eafb4544f3a5d2bc45b4f | Python | 77,744 | 1,764 | from frozendict import frozendict
from collections import defaultdict
from dreamcoder.frontier import *
from dreamcoder.program import *
from dreamcoder.type import *
from dreamcoder.utilities import *
import time
import itertools
class GrammarFailure(Exception):
pass
class SketchEnumerationFailure(Exception):... |
f8f9307ff1b636878368ea270af6b2c19732244c3e76eaedd082de142497a687 | Python | 77,804 | 2,399 | # coding=utf-8
# Copyright 2026 The Google Research Authors.
#
# 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 applicab... |
5142abd36844625ba37363845472de78b6656cb653b2b38ec85f9c7886059843 | Python | 77,850 | 1,660 | import pathlib
import os
import sys
# from mmcv import Config
import mmcv
import torch
from packaging import version
import mmdet
assert version.parse(mmdet.__version__).major == 3
from mmengine.runner import Runner
from mmengine.hooks import Hook
from mmengine.config import Config
from mmpose.datasets.datasets impo... |
4190699ffeba7af8222fd091468e03df6f60a3a7d2fabfec1b55f99c5acdd389 | Python | 77,914 | 1,656 | """
Find columns on synapse tomograms (ListTomograms) and measure their statistics.
Files for columns visualization in VTK format.
Input: - 3 STAR files (layers) with the ListTomoParticles pickles
Output: - Plots by tomograms and globally:
+ Number of columns
+ Column... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.