sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
0b620d16e4dcc212e2fcff151856539ec88cffbdbd4259c69fbeb00a95e9173b
Python
51,001
1,214
"""Registration quality metrics. Provides pairwise image similarity and overlap metrics used to evaluate registration quality. All functions accept 2D or 3D numpy arrays and return a single float scalar. Metrics ------- getMutualInformation : Mattes mutual information (via SimpleITK) getNormalizedMu...
01cff2ec7873e1bae537dc11a2a497fa5327dcf73c6d526301e76c26c3696760
Python
51,017
1,206
import os import json import shutil import pandas import numpy as np import tifffile import importlib import time import logging import pickle import datetime import networkx as nx from matplotlib import pyplot as plt from typing import List from typing import Tuple from typing import Union from typing import Dict from...
43269784f03b76760f7cfefc6d8a44321881db7142be0756f293016e4d5778da
Python
51,028
1,146
""" Module for comparing whisker activity across datasets: load whisker data from all selected recordings (now 25 after filtering for no/bad whisking) - using get_wskvar and prepare_df; analyse slope of avg whisking behaviour (pre and post drop) within t_slope (inspired by Variance_pre_post_betweenr.svg window where va...
6faf1452a11e80e79c3d78c975384e25a9028f8d4056711265d2d427a97bd3d0
Python
51,035
1,396
#============================================================ # # 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...
0d813159a3cb4ea284e8a239f2bea36b30e171dc0825f8024e5aeaf713161a58
Python
51,051
995
"""A local neural observatory; all model work belongs to one dedicated thread.""" from __future__ import annotations import html import hashlib import json import threading import time from collections import deque from dataclasses import fields, replace from datetime import datetime from pathlib import Path import n...
6f711ce76ec55ac10717617a761fb39b5c12a1a5fb01790ac3f13a6cb6e0e199
Python
51,083
1,387
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # 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 o...
99ee7c256baa9347a4d0fc5313fb20bf1bc416adfb00b9d01a9a2a4015479b4c
Python
51,084
1,387
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # 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 o...
5106c60e2c69971735b209e824504e2f03511b376015c721b048cb6d48935450
Python
51,100
978
import os import json from ckg.graphdb_builder import builder_utils from ckg import ckg_utils from ckg.analytics_core.analytics import analytics from ckg.analytics_core.viz import viz import pandas as pd import itertools import time ckg_config = ckg_utils.read_ckg_config() log_config = ckg_config['analytics_factory_lo...
a47aa066cbc84fa9a2360270405a1e0add5ea423c4d073de9404938d42ee8846
Python
51,146
1,317
#!/usr/bin/env python # -*- coding: utf-8 -*- from plot_methods import plotting_correlation, network_sketch, plot_population, plot_signal_sum, calc_signal_power, plot_population from cellsim16popsParams_modified_spontan import multicompartment_params import analysis_params import plotting_helpers as phlp from hybridLFP...
adea7cd3d6884f3b2f4d44c2bb87c719f246119af542183c36eacd4fa00b8ce5
Python
51,193
553
# TODO: maybe some OpenRAVE links are disabled # http://openrave.org/docs/0.8.2/collada_robot_extensions/ # < extra # type = "collision" > # < technique # profile = "OpenRAVE" # ignore_link_pair NEVER_COLLISIONS = [('base_bellow_link', 'base_footprint'), ('base_bellow_link', 'bl_caster_l_wheel_link'), ...
7b9a80c481aa92753b55dc1b3321fb0d59dc6881014fcc01add8a5fbde077562
Python
51,219
1,364
""" The Mapper generates a mapping between all the datasets involved by turning all known type labels and synonyms into a graph and then trying to find the minimal connected components of the graph. The rule is this: - for each neuron find *a* shortest path to a neuron in the other datasets (if it exists) - keep only ...
195ed2771c6ab258826539d9721cb1a5d10bc3b7e68ab00f140b4afef330dccb
Python
51,229
1,231
# -*- coding: utf-8 -*- # # Base class for all computational classes in Syncopy # # Builtin/3rd party package imports import os import sys import psutil import h5py import numpy as np from itertools import chain from abc import ABC, abstractmethod from copy import copy from tqdm.auto import tqdm if sys.platform == "w...
0768be1d7a96b11317479ebe37ffd4065bfed80b329d5a9e675c4e76af07c51a
Python
51,463
1,729
from __future__ import annotations import os from copy import deepcopy from io import StringIO from logging import INFO, WARNING, getLogger from pathlib import Path from shutil import which from types import SimpleNamespace import numpy as np import pytest from ase.atoms import Atoms from ase.build import bulk from a...
af943ce0eeb3d66113cebb0a71636fb3c4a8a86474e66cf234c39a66a8971112
Python
51,513
1,233
""" Unit tests for the registration module. Tests are organized into tiers: - TestPureComputation: Pure math functions (no I/O, no external tools) - TestImageUtilities: Functions that process numpy arrays (need numpy/scipy) - TestNiftiIO: Functions that read/write NIfTI files (need nibabe...
a3f9b0d1f02bf773430071c77ea1b9e18d478bd4647eba76057d795d66582b9d
Python
51,697
1,350
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2017 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """PEP 376 implementation.""" from __future__ import unicode_literals import base64 import codecs import contextlib import hashlib import logging import os import posixpath import sys import z...
e7968bd8c5f81b7d8c843819d1e2c7526cf90a5854bf2839b8dcc5965900db01
Python
51,735
1,560
import os import random import time import numpy as np import pandas as pd import torch import torchvision from torchvision.transforms import v2 torch.set_num_threads(1) torch.set_num_interop_threads(1) torch.use_deterministic_algorithms(True) if torch.cuda.is_available(): torch.set_default_device("cuda:0") ...
e1a6fd1abdc6e65480203d2840c238d33c16dbc7475b5d7bfa1cf929ed61623b
Python
51,799
864
import copy import os import json import logging import warnings import torch from tqdm import tqdm import pandas as pd import numpy as np from torchdrug import data, utils from torchdrug.core import Registry as R from torch.utils import data as torch_data from cg_steps_energy_injection import cg_protei...
c0dcc6fb3111cd2fd71a5b3e9c13d55722d11dadac9149649f4fb99f4b6b3160
Python
51,991
1,300
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import gzip from io import BytesIO import json import logging import os import posixpath import re try: import threading except Impo...
31de2168dbc7935291cd49affbdbfdc31f14eae91ebd4c3431e5255e5e87a477
Python
52,166
1,271
# coding=utf-8 # Copyright 2019-present, Facebook, Inc 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/LICENSE-2.0 # # Un...
f0725bc343f5d28b92d670d3dd5d65f283a23a6a337ce473bbfd85bc292d09f0
Python
52,189
1,561
from random import Random from fitnessFunctions import fF,frange import sys import logging from numpy import random import numpy as np import copy import array as array1 import random import json import time import os import bluepyopt as bpop import bluepyopt.ephys as ephys from math import sqrt import inspyred from in...
6c612f9fba107e0b53f39023a2336e0a5742a38962a93bd580950808a7551e91
Python
52,265
1,282
from math import fsum, sqrt from copy import copy from pyelectro import analysis from traceHandler import sizeError import efel import numpy as np import scipy import inspyred from inspyred import ec from inspyred.ec import emo from inspyred.ec import variators from inspyred.ec import observers import modelHandler impo...
a867400f895bd163b7e4c86d7a508b762a4642ea5e66a465895be0a7ef3f5cf8
Python
52,286
1,036
################################################################################ # 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...
a9595414df03c347d466f4dd2d1e12b4616f62b0d37995a2c81a68ae89b13a3a
Python
52,291
1,071
import pandas as pd import numpy as np from sklearn.metrics import silhouette_score from matplotlib import pyplot as plt from os.path import exists import random from math import ceil import matplotlib import time_series_tools as ts_tools #------------------------------ # Clustering-related functions: #--------------...
5ce0848e8638e04ec3f3791e6a206f6f5aa799eeb91deb91d56d33849674999b
Python
52,398
1,248
# coding=utf-8 # Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, Inc. # # 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.or...
03fd0426b46c9aba713d3e33201a41e608374773a5ce16acfc12ebf530bc6bc1
Python
52,629
1,253
""" GUI for converting images and points to Neuroglancer format. """ import os import sys import glob import traceback from natsort import natsorted from PySide6.QtWidgets import ( QWidget, QVBoxLayout, QHBoxLayout, QLabel, QFileDialog, QCheckBox, QPushButton, QDouble...
7cdaa4744fbbec32b1c226eef9b72877d0e0f467c3e04b4e7144078290c97496
Python
52,693
1,093
#!/usr/local/bin/env python # ============================================================================= # GLOBAL IMPORTS # ============================================================================= import os import copy import scipy import logging import operator import collections import yaml import numpy a...
f4309cb34756fabefb0b5a9bd15c3b5f2fd7ec790052e40baa33b5a5e9900b23
Python
52,793
2,334
from __future__ import annotations from dataclasses import dataclass from joblib import ( Parallel, delayed, parallel_backend, ) import numpy as np import pandas as pd from threadpoolctl import ( threadpool_limits, ) from sklearn.metrics import adjusted_rand_score from sklearn.mixture import Gaussi...
8fa57aaeee113f5d12abfee522465975c64959a01c943d70a624ef04338d4841
Python
52,859
789
"""Interpolate GKs to cube centres for MonoAlg3D simulations""" 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 # def convert_from_monoalg3D_to_cm_and_translate(nodesXYZ, meshname): # warn('Hi ...
f9228ab63a8951d7a1d3480a8243247d031a3593504f4f1390d8367f3d207a60
Python
52,906
1,341
from dreamcoder.grammar import * epsilon = 0.001 def instantiate(context, environment, tp): bindings = {} context, tp = tp.instantiate(context, bindings) newEnvironment = {} for i,ti in environment.items(): context,newEnvironment[i] = ti.instantiate(context, bindings) return context, newE...
b70cc8959e1e7a8ac0bcfd552e7720e4cfcb6d440b826c50db88823d7e976222
Python
52,908
761
"""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 if __name__ == '__main__': if len(sys.argv) ...
03f25605dd3627c960f77a3a5618249c1188d54660feb4e27c89e779c2d3fa5b
Python
52,958
763
"""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 if __name__ == '__main__': if len(sys.argv) ...
4c52c3e5b9cb2609a1ce74ec6eea78967e5509d354156fab10d79643e4e6d701
Python
52,974
1,528
""" Contains class Affine for preforming affine transformation (general linear transformation followed by translation) on points (vectors). # Author: Vladan Lucic (Max Planck Institute for Biochemistry) # $Id$ """ from __future__ import unicode_literals from __future__ import absolute_import from __future__ import div...
b27ddbdc3c6ad9dadf50608b28e916c713d8584451ce072a9e17b8fd6d9a0fa7
Python
53,195
855
"""Run personalisation on the full 12-lead ECG beat recording""" import sys import multiprocessing import os # import time from warnings import warn import math import matplotlib.pyplot as plt import numpy as np import pandas as pd from datetime import datetime # import pymp if __name__ == '__main__': if len(sys...
e7de29e39c971676eff2dd9be45243e2e47ae8464cbf3a843fe319ef4e21a593
Python
53,256
1,317
# # MIT License # # Copyright (c) 2023 GT4SD team # # 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 limitation the rights # to use, copy, modify, merge,...
dcfbc3064255196c4dedf4cbd8d379c31eda3d2f9878eacac9da3e4e207cdbeb
Python
53,298
974
import os import multiprocessing import random import numpy as np os.environ['TF_ENABLE_EAGER_CLIENT_STREAMING_ENQUEUE']='False' import tensorflow as tf from tensorflow import strings as tfs import src.metrics as metrics import src.utils from src.losses import poisson_multinomial from scipy.stats import zscore as zsc...
73b8e798a154f432f14c95b451bc17b7a67d149a9b06556c580d50afdc5203fc
Python
53,424
1,198
""" pygments.lexers.python ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Python and related languages. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import keyword from pip._vendor.pygments.lexer import DelegatingLexer, Lexer, RegexL...
e29c911695f6c7bdc7397d002925f5393a18efcaa0d8159e846351522ffe9f16
Python
53,490
1,254
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University 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 Lice...
a4736a122739e540efe364710c2257685697392e1d8476ce77fd7fbb7a631a56
Python
53,603
1,351
#morphoglia/morphometrics/builtin.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Morphometric extraction module for the MorphoGlia pipeline. Single source of truth for: - Canonical soma mask (distance-transform + global dilation) - Whole-cell skeleton (true 1px, no pruning) - Branches mask (cell minus som...
e4d5f7eddb4cae924c36935048297bc5ed65c13aa3ffc714bb85b440505e2b43
Python
53,659
1,307
# coding=utf-8 # Copyright 2021 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 # # Unless r...
cad4f69f77e797c3c6086b524fd12cf3b435f17d0e1ec551fe024e9a457b2406
Python
53,747
1,321
# coding=utf-8 # Copyright 2020 The Facebook AI Research 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/LIC...
542e03717e483f8835870ae4eb0f26ff24deb3d2d99f4bd18ff68ae044ac480c
Python
53,847
1,315
from __future__ import unicode_literals, absolute_import from builtins import int, range, dict, zip import os import io import re import sys import queue # Future warning from cython in h5py import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import h5py import numpy as np np.seterr(all='...
2634d8fcd7a3598aa7f6f0f069b8fdce7527c1820e3ced93a555459ab0c0ae13
Python
53,933
1,392
# -*- 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_...
f1b741cbff8099828d05bd99aafa1c16d873a4f0ea5d9e10857a1dc8594e8e5b
Python
53,943
1,502
# TODOs: # - add parameter to use the "untyped" fraction in the clustering? import re import json import functools import pandas as pd import numpy as np import seaborn as sns import matplotlib.colors as mcl import matplotlib.pyplot as plt from pathlib import Path from tqdm.auto import tqdm # Fastcluster seems to b...
d3c6c45bbff64bfa4585aaf1f38e2b95ae72b5f36edbf7f98c5efed1fd4d0a84
Python
54,050
1,053
import math import os import platform import sys from pathlib import Path import shutil try: import importlib.resources as pkg_resources except ImportError: # Try backported to PY<37 `importlib_resources`. import importlib_resources as pkg_resources import skimage import cryovesnet from . import pyto_scrip...
8c2ca4d2f3910882d394de01ecd908174445d8c084790fb3fc06d22a49c9f299
Python
54,082
1,369
# dcamapi4.py : Dec 16, 2022 # # Copyright (C) 2021-2022 Hamamatsu Photonics K.K.. All right reserved. import platform from enum import IntEnum from ctypes import * # ==== load shared library ==== # abosorb platform dependency __platform_system = platform.system() if __platform_system == 'Windows': __dll = wi...
992fae4230700595e88ff754e400cdaa20871e76fa6fb1642e0a6187b6b5f543
Python
54,114
1,375
# coding=utf-8 # Copyright 2020 Microsoft and the Hugging Face 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 require...
1a1f7891d158d4bbfd86a38e1abd26ba657a79c98679549804bdcdd962cb8542
Python
54,128
1,466
# 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...
688d15730b8c94a876b2d3992235278205a5fd89deb85085a9c522a1e723de0e
Python
54,241
1,255
# 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...
230a349730102c7cb4e3778604ec2ee58d0c5adbf149a06d5b17d07adf5ae489
Python
54,309
1,320
# coding=utf-8 # Copyright 2018 Google AI, Google Brain 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/LICENSE-2.0 # # U...
daddfb9d64f079138bcbe2dca281d0b8d5846a93ecb6b514ea5998bc9768c09f
Python
54,317
1,401
############################################################################################################ # Set of functions for reading the results returned by DisPerSe tools # # __author__ = 'martinez' import vtk import numpy import scipy from astropy.io import fits import math try: import pyseg.pexceptions ...
f71643984170954faa0408bad87df04682576d39bc76f9db70e09ab39bce28d0
Python
54,481
1,471
""" Contains class Contact for analysis of contacts between segments (from a segmented image) and boundaries specified on the same image. # Author: Vladan Lucic (Max Planck Institute for Biochemistry) # $Id$ """ from __future__ import unicode_literals from __future__ import absolute_import from builtins import zip fr...
d4ced16a6c8594bc377c738041c9f66d763d607a476258c648cf6f8cf60a2df0
Python
54,618
1,537
import gc import os from pathlib import Path from typing import cast import bpy import nodebpy from biotite import InvalidFileError from bpy.props import ( BoolProperty, CollectionProperty, EnumProperty, FloatProperty, IntProperty, StringProperty, ) from bpy.types import Context, Operator from ....
5a521c94eaaeb16bce3928dcba144f41de518622481752d6d7f806fb6b36e5b2
Python
54,629
1,214
import numpy as np import torch import torch.nn as nn from torch import optim from torch.utils.data import Dataset, DataLoader from tqdm import tqdm tqdm.pandas() from itertools import product import argparse import random import pandas as pd import pickle from typing import Union, Optional, List, Tuple from collectio...
75a8b4d04f24f914707515af511637cd24ebc8914174b3df4b6effebb90aa166
Python
54,684
1,095
import datetime import dill from dreamcoder.compression import induceGrammar from dreamcoder.utilities import * try: from dreamcoder.recognition import * except: eprint("Failure loading recognition - only acceptable if using pypy ") from dreamcoder.enumeration import * from dreamcoder.fragmentGrammar import *...
5cfb5d0017ea2f3d02d8d621d2e19e28c5aa650f803da0ba5c8cdcda68a480c5
Python
54,740
1,576
#!/usr/bin/env python """ There are two tasks preformed by this script: 1) An image is segmented using the hierarchical connectivity procedure to yield connectors (segments). 2) These connectors are classified according the specified classification criteria. This script can be used to execute these two task...
5edca131701cfe166caf6d7e2d208398b0a02b2469a658968de0ed9ae2294e3f
Python
54,746
1,576
#!/usr/bin/env python """ There are two tasks preformed by this script: 1) An image is segmented using the hierarchical connectivity procedure to yield connectors (segments). 2) These connectors are classified according the specified classification criteria. This script can be used to execute these two task...
1ad5ac35a8a9ec8f06c6dede6ebcae0c1216f2c602bdc58eafa3c5f1fed4718d
Python
54,777
1,312
# 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...
b2f98c94516034aae209599032963deee306306dee3c7c64ebdef8b2711b3955
Python
54,787
1,217
"""Apply Transform tab - apply registration transforms to points and/or data. Contains: - ApplyTransformsTab(QWidget): accepts a registration output directory, auto-detects transforms (ANTs/Elastix + Laplacian), and runs point and/or data transformation in an external coloured terminal. """ import os imp...
ff54e9da71c1a868776701398f4c8c2401275a9f9b77344793334691b18388e5
Python
54,890
1,269
# -*- coding: utf-8 -*- """ Created on Tue Dec 13 16:55:42 2016 @author: Laure Spieser and Boris Burle Laboratoire de Neurosciences Cognitives UMR 7291, CNRS, Aix-Marseille Université 3, Place Victor Hugo 13331 Marseille cedex 3 This file is part of Myonset. Myonset is free software: you can redistribute it and/or m...
f4358b5cb7735de783871fbfad1501c0d1cb3e1145dcb73aea144ff4efc948cc
Python
54,949
1,352
"""Tests for the unified napari viewer module (regtools.utils.napari_viewer). These tests exercise the pure-Python utilities (pad_and_stack, lazy_load_stack) and verify import paths. Tests that require a running napari instance are skipped in headless CI environments. """ import numpy as np import pytest ...
80daaad0f86941f9f2fe8b5aedbf1297d0310e8d832f3909af3ede27cd8dadea
Python
54,971
1,119
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 16 08:00:51 2020 @author: daltonm """ #%matplotlib notebook import numpy as np import pandas as pd import matplotlib.pyplot as plt import dill import os import seaborn as sns import re from sklearn.decomposition import PCA from sklearn.preprocess...
827cec4456b8419d3620f5e2a0abdcbc641222c47043fa1f428646a5c21057dc
Python
54,971
1,119
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 16 08:00:51 2020 @author: daltonm """ #%matplotlib notebook import numpy as np import pandas as pd import matplotlib.pyplot as plt import dill import os import seaborn as sns import re from sklearn.decomposition import PCA from sklearn.preprocess...
46bbf67222b8752da3e32ad66cebe95ef4ce441a664a49180f57c6d1e8abc396
Python
55,025
1,418
############################################################################################################ # Set of functions for reading the results returned by DisPerSe tools # # import vtk import numpy import scipy from astropy.io import fits # import math # from pyorg import pexceptions import warnings from pyto...
2744906faa1af12fc1ef0eab2eb3e248e2539829e5737da81d200a529ce3db13
Python
55,055
1,228
# # Helper routines for working w/dask # # Copyright © 2020-2025 Ernst Strüngmann Institute (ESI) for Neuroscience # in Cooperation with Max Planck Society # Copyright © 2026 Ernst Strüngmann Institute (ESI) of the Max Planck Society # # SPDX-License-Identifier: BSD-3-Clause # # Builtin/3rd party package imports impor...
2da5c2d264eeda94076abf93d13069f73a60deecba6a8695a1f5c7e710dc0733
Python
55,164
1,108
# 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...
a2e6e89a5588c75d62623ea0dcd9d1849b5d205e6c523fcda495f08f809efbc7
Python
55,174
1,113
""" 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...
7813761ccae6912c095a86ade8bf6dd9bb9352fe2f95e61f974c8be0e6eb85b9
Python
55,190
1,061
#!/usr/bin/env python # Copyright (c) 2019-2020 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides a parser for scenario configuration files based on OpenSCENARIO """ from distutils.util import strtobool im...
002309602865a18f83e9502b5c7c5dc18341c39bebec022cc4980261013ecc0b
Python
55,264
1,230
""" Utility functions for all our codes. """ import os from os.path import join as joinP import logging import cPickle as cpk import collections import re from bioservices import KEGG from Bio import SeqIO from Bio.KEGG import Enzyme import networkx as nx import matplotlib.pyplot as plt import numpy as np from scipy....
d3f177033500969c34b57c4618fea55f34ea1233cc09656103d2d12a44d17fe9
Python
55,268
1,219
""" 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...
655984d620a07a65c68f7da67ede83097ae6c180ba101c69ce6a0aadcc027501
Python
55,300
1,445
import os import warnings from collections.abc import Sequence from typing import Any, Literal, TypeAlias, cast import matplotlib.pyplot as plt import MDAnalysis as mda import mdtraj as md import numba as nb import numpy as np import pandas as pd from Bio import SeqUtils from MDAnalysis import Merge, transformations f...
b57ee72af594f50731337ed8768ded5476983dbb2b214dd299305d67dae1adda
Python
55,321
1,181
import numpy as np import unittest import pyntbci FS = 120 PR = 60 SHIFT = 2 v = pyntbci.stimulus.make_m_sequence() SHIFTS = np.arange(0, v.shape[1], SHIFT) V = pyntbci.stimulus.shift(v, SHIFT) V = np.repeat(V, FS // PR, axis=1) N_CLASSES = V.shape[0] CYCLE_SIZE = V.shape[1] / FS LAGS = SHIFTS / PR N_TRIALS = 3 * N...
9aa94483c5d7ef3bea83b673429d46d1410672f7f0249f02240b16c654cb3d87
Python
55,367
1,369
# coding=utf-8 # Copyright 2021 The I-BERT Authors (Sehoon Kim, Amir Gholami, Zhewei Yao, # Michael Mahoney, Kurt Keutzer - UC Berkeley) and The HuggingFace Inc. team. # Copyright (c) 20121, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
8e79394bf7faa0e568bac6d21f4d5287df9fc87cc39a4bf3c9e4f9ecac61e938
Python
55,438
1,644
import itertools from abc import ABCMeta, abstractmethod from math import cos, radians, sin, sqrt from pathlib import Path import blf import bmesh import bpy import gpu import MDAnalysis as mda import numpy as np import numpy.typing as npt from bpy_extras import object_utils, view3d_utils from gpu_extras.batch import b...
047ed1cf2bb32abc51356fdcac4f63acc0ae4f43b026ce116dc2d090368f0142
Python
55,502
1,200
from __future__ import annotations import copy import math import warnings from collections import OrderedDict from typing import TYPE_CHECKING, Any, Literal import matplotlib.pyplot as plt import numpy as np import pandas as pd import scanpy as sc import seaborn as sns from fast_array_utils.conv import to_dense from...
d292e2eeec80af721231005c737e9798654af2c1fdb7839d89e21f16f5f7945a
Python
55,552
1,284
# 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...
a0ba88fe732020b453450908bbf9d902cba4a85de56546954d5cd06488f9f9d0
Python
55,578
1,600
import sys import os import datetime import argparse import logging import pickle import glob import subprocess import logging import inspect import getpass import random import collections.abc import re import time import tensorflow as tf import imgaug as ia import numpy as np import h5py import matplotlib.pyplot as ...
54fc672e5d23559631555d9e38786b0d032f1f4f1b92309f35db11d3c063322d
Python
55,609
1,399
import PoseCommon import PoseTools import tensorflow vv = [int(v) for v in tensorflow.__version__.split('.')] if (vv[0]==1 and vv[1]>12) or vv[0]==2: tf = tensorflow.compat.v1 else: tf = tensorflow # from batch_norm import batch_norm_mine_old as batch_norm if vv[0]==1: from tensorflow.contrib.layers import ...
f3320af97cb800e2faeb3b8f8f71a8e8251f4b5784fcde90073397c30dd6508f
Python
55,642
900
#!/usr/bin/python # -*- coding:utf-8 -*- import logging import os import time import warnings import torch from torch import nn from torch.utils.tensorboard import SummaryWriter import numpy as np import models import datasets from loss.focal_loss import FocalLoss from utils.entropy_CDA import Entropy from utils.entr...
7e3c6e6aa539a88849a07d490922b5e6ed6c13cc658c75312c2137d1a24d11fa
Python
55,679
1,283
""" Module to extract low-dimensional properties from npx dataset; plot population activity in pc space, both average and selected trials; used get_data from glm_module.py module to load data id df divided by pre and post drop; Attention: load output of whisk_plot.py module, which return similarity of whisker bouts fo...
692d0f6f82a48fff1ac82cfc8220451a02ccfbc0e6518736a69d42f5d6cb956c
Python
55,757
1,577
import numpy as np import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore from pyclamp.gui.pyqtplot import * import pyclamp.gui.lbwgui as lbw from pyclamp.gui.pgb import pgb from pyclamp.gui.xyfunc import * from pyclamp.dsp.channel import chWave from pyclamp.dsp.lsfunc import * from pyclamp.dsp.wffunc import min...
494040f5d09d77efcd1f28708b4d1d87ad4d08a6528ae2c35c9e13d53d7967f2
Python
55,761
1,187
options = dict( model_extensions=[ 'h2o.model.extensions.ScoringHistoryGLM', 'h2o.model.extensions.StandardCoef', 'h2o.model.extensions.VariableImportance', 'h2o.model.extensions.Fairness', 'h2o.model.extensions.Contributions', ], ) deprecated_params = dict(Lambda='lambda...
532cb116245c3aabe5265f92c548ec64d90f8ac4f9989e660a406be030c44135
Python
55,899
1,208
import inspect from collections import deque import torch from torch import nn from torch.nn import functional as F from torch.utils import data as torch_data from torch_scatter import scatter_max, scatter_add from torchdrug import core, tasks, data, metrics, transforms from torchdrug.layers import functional from to...
a65074147bd2aa7026fccbe0edaa50a77d08c4bfaf4f502607df412031e7c345
Python
55,974
1,227
import PoseCommon import PoseTools import tensorflow vv = [int(v) for v in tensorflow.__version__.split('.')] if (vv[0]==1 and vv[1]>12) or vv[0]==2: tf = tensorflow.compat.v1 else: tf = tensorflow # from batch_norm import batch_norm_mine_old as batch_norm if vv[0]==1: from tensorflow.contrib.layers import ...
5c82d02e9a6eb50379d7d52d4bcb78abe3b58a8e17ff093af2c5dfc1ae05686c
Python
56,072
1,665
#!/usr/bin/env python2 # Interactive script for the setup of dynamics calculations for SHARC # # usage: python setup_traj.py import copy import math import sys import re import os import stat import shutil import datetime import random from optparse import OptionParser import readline import time from socket import ...
144e49c3e087a2f4a39226f946177eb2919261972dbbcbedf7237eae37986eea
Python
56,086
833
"""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 if __name__ == '__main__': if len(sys.argv) ...
4d639f9bd9e9547973101e3a5b9bb87b6f121c68a42e54e1593ed1c2908a45b6
Python
56,092
1,096
import copy import csv import gzip import os.path import pathlib import platform import shutil import tempfile import threading import time import traceback import uuid from queue import Queue from shutil import copyfile from threading import Thread import pandas as pd from boto3.s3.transfer import TransferConfig from...
3ee8eda553c8e15485a5449f0c25cc2f2094c3f54e3f877d6d5ee5259e5e766f
Python
56,151
1,329
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...
27cf5823f9769be0d3c2af2c318a1a9eebe58654de3ace4e032ff6d2f8a6487d
Python
56,221
1,334
"""The maintainer's fitting tool and its review viewer. Two halves, both exercised against SYNTHETIC atlases: the real volumes are gitignored and absent from a clean checkout, and a test that silently skipped itself on their absence would be no test at all. * ``scripts/fit_hemisphere_planes.py`` - fits the inst...
8cb3348b0708fbdd2892fb37d7aa1d57e4c9118540a91e77fd2bbe218ea743cf
Python
56,339
1,655
################################################################################ # Copyright (c) 2021-2024, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # Written by D. Jones <djones@llnl.gov> and UCSD collaborators in listed in CONTRIB.md # # All rights reserved....
902140e9e4a95f3454add8ca7f28dda621a2458b0a5e086a45d301f2b3056dff
Python
56,348
1,433
import requests as r from Bio import SeqIO from io import StringIO import re import pandas as pd import numpy as np from Bio import SeqIO import uuid import copy import os from Bio.PDB import PDBParser, MMCIFParser from Bio.PDB import Superimposer from Bio.PDB.PDBIO import PDBIO, Select from Bio.PDB import MMCIFIO from...
efd07e8181720b33d3c7f353eeb2dd2d93228088d40737c651ee2638de9f4024
Python
56,462
1,303
""" Set of classes for analyzing Synaptic Structural Columns # Author: Antonio Martinez-Sanchez (Max Planck Institute for Biochemistry) # Date: 1.09.18 """ __author__ = 'Antonio Martinez-Sanchez' import vtk import copy import math import numpy as np import scipy as sp from pyorg.surf import TomoParticles, Particle f...
3c63923558356115fec573d4e6254d018ceddb45a0c00d7cfe17d61bf3e73c70
Python
56,637
869
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .scVI_distribution import * from .utils import * from .loss import * import os import copy import random import numpy as np import pandas as pd import scipy import torch from torch import nn, optim import ...
39afad051ddc72ee9672ec4976b2e70eecd64c8be3c232e69aa1cb930886bb6c
Python
56,708
1,323
"""Evaluation of predicted survival curves for right-censored outcomes.""" from __future__ import annotations import warnings from functools import partial import matplotlib.pyplot as plt import numpy as np from lifelines.statistics import logrank_test from SurvivalEVAL.evaluations.calibration import ( d_calibr...
c22715221ad310124d0375320ae6797a695fc4fa7dce0ba6a1b9b065d4e556f5
Python
56,803
1,376
# Node-group asset "Style Cartoon" (GeometryNodeTree), dumped by nodebpy.assets.dump_library. # Rebuild the library with nodebpy.assets.build_library (nodebpy build). # _build_group() is the source of truth: the docstring, __init__ and accessors are regenerated from it on the next dump. import math from typing import T...
309b571bb991db7038d029cb7473665c4c486b74a05de067401748a73f2486bb
Python
56,882
1,712
# 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...
c7a36234ec1b8184c808af06a15a7292298883d4b9dc92b63c3119cbae9335f9
Python
56,986
1,730
# -*- coding: utf-8 -*- """ Created on Tue Nov 3 13:14:05 2020 @author: Xingyan Liu ==================================================== Functions for downstream biological analysis """ import os from pathlib import Path from typing import Sequence, Union, Mapping, Optional, Callable import logging import numpy a...
721a033c206fceda6ed69157b1c57567154db77b6b05c4ac67224406bf40be24
Python
57,042
1,098
"""Compare HED schemas and generate structured changelog reports. This module provides tools for analyzing differences between HED schema versions or variants. It supports fine-grained comparisons at the entry level (tags, units, properties, etc.), detection of schema metadata changes, and structured changelog generat...
8b7f3fa4371c853de56a573a107e64c272637abcc27750cf55e601019149d4a0
Python
57,116
1,330
"""Tests for the true-µm in-memory 2D registration path.""" import os import sys import numpy as np import pytest PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) if PROJECT_ROOT not in sys.path: sys.path.insert(0, PROJECT_ROOT) from regtools.registration.registration_2d...
4e522fb180c5a42446a61ce6f77888ecc6b2feae4d84df5bf0657154059e1458
Python
57,548
1,457
# # This file is part of openCARP # (see https://www.openCARP.org). # # The openCARP project licenses this file to you 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/lice...
ea5a15086c7e464fc0e3876beb0245eab620a0f6142bde4b8f5c334804c31be9
Python
57,561
1,046
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 16 08:00:51 2020 @author: daltonm """ #%matplotlib notebook import numpy as np import pandas as pd import matplotlib.pyplot as plt import pickle import dill import os import time import glob import math import seaborn as sns from sklearn.decomposi...