sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
5b2226e33d1c4c832c767534d5331567c641f0892873ab402ca2a8b51319d65d | Python | 77,975 | 1,736 | # coding=utf-8
# Copyright 2018 Mesh TensorFlow authors, T5 Authors and 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... |
b3ce95331ea5026d97a24ce5f129d891c091d1706fb7910cb1cad1f22c83d5d4 | Python | 78,111 | 2,166 | """
Contains class Rigid3D for preforming rigid body transformation and scalar
scaling 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 division
f... |
aae94e891541d47db8f122a3e9996d14b31eb47d41ccd4e2d784a4205b9f8597 | Python | 78,237 | 1,871 | import math
import warnings
from functools import reduce
from collections import defaultdict
import networkx as nx
from matplotlib import pyplot as plt
import torch
from torch_scatter import scatter_add, scatter_min
from torchdrug import core, utils
from torchdrug.data import Dictionary
from torchdrug.utils import p... |
c822b50edde33d9af82cb491751fe7dd12a364ba0162c734ccbf8043e191f97a | Python | 78,360 | 1,641 | """
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... |
aea8dc346f8cd349d3ec20384e9f08b30c2bab060009fe1dd064d010b07116ba | Python | 78,374 | 1,745 | import numpy as np
import copy
class Point():
def __init__(self, newx, newy, newz):
self.x = newx
self.y = newy
self.z = newz
def Update(self, otherx, othery, otherz):
self.x = otherx
self.y = othery
self.z = otherz
def mod(self):
return pow((self.... |
4db84cf0760dd7826a10c88934351154e99daf41743593fa4895bb1a40d7b7dd | Python | 78,616 | 1,940 | """
Set of classes for dealing with a particle list
# Author: Antonio Martinez-Sanchez (Max Planck Institute for Biochemistry)
# Date: 1.06.16
"""
__author__ = 'Antonio Martinez-Sanchez'
import vtk
import csv
import errno
from .variables import *
from pyorg.globals import *
import pyorg.disperse_io as disperse_io
im... |
c530a91e7a4f9dddeff2c00ed5884361a57d8329636f5aa357a223b7a46e2327 | Python | 78,616 | 1,827 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018-2021, 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 ... |
117630522202a6f5e790a0b4070538568faed88ba1c8e25e96ab60d67a5c432e | Python | 78,827 | 1,828 |
"""
MoCHI data module
"""
from loguru import logger
import os
import re
import copy
import random
import math
import time
import gc
import queue
import threading
from os.path import exists
import pyreadr
import torch
import pathlib
from pathlib import Path
from pymochi.transformation import get_transformation
import ... |
719b1fe958291a4ce879234eb3f6521601e1cefff265e6c10a0d6ac4e70d90c2 | Python | 78,986 | 1,329 | # this lib, together with the preprocess_mice_trials script
# 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 th... |
7a1a6de29eb245c6b8514f3b22b3e893e6c4b5ef9d73a2cba603409bf07fa33d | Python | 79,388 | 1,780 | #!/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 ... |
3a7f609482b47f88c7fdacba4a9b085da1d0158e55dfeb1d598c3bc52ff31793 | Python | 80,037 | 2,325 | """Module to detect spindles.
"""
from logging import getLogger
from numpy import (absolute, arange, argmax, argmin, around, asarray,
concatenate, cos, diff, exp, empty, histogram,
hstack, insert, invert, isnan, log10, logical_and, mean, median,
nan, ones, per... |
ff1a437e396a25a3dd607fbe3da3f5ac5973ebd3d23459aa65161f59ed436567 | Python | 80,044 | 2,109 |
# Version: 0.21
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/python-versioneer/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible with: Python 3.6, 3.7, 3.8, 3.9 and pypy3
* [![Latest Version][pyp... |
af355ac4100f79018973351a91141dbf00931ef07e29e633404ec033d8f5c89b | Python | 80,049 | 2,163 | # Version: 0.21
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/python-versioneer/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible with: Python 3.6, 3.7, 3.8, 3.9 and pypy3
* [![Latest Version][pypi... |
8a9a968aae401f3af0733b7a736e803f4e4b961e9ae7f19a5d1a4e06a6e88070 | Python | 80,078 | 2,209 | import abc
import collections
import collections.abc
import functools
import operator
import sys
import types as _types
import typing
__all__ = [
# Super-special typing primitives.
'Any',
'ClassVar',
'Concatenate',
'Final',
'LiteralString',
'ParamSpec',
'ParamSpecArgs',
'ParamSpecK... |
6e4974633c26c528305b9578278a8a491fa3f7412dd8c09169ef50b8cb8569eb | Python | 80,083 | 1,997 | from datetime import datetime
import functools
import glob
#from gudhi.clustering.tomato import Tomato
import h5py
import matplotlib
from matplotlib import animation, cm, transforms, pyplot as plt, gridspec as grd
from matplotlib.collections import PathCollection
import numba
import numpy as np
from ripser import Rips... |
ee4c935b66f16e9382201f9229c51a4b81dd158613d7338ad59ed9a284dd57b4 | Python | 80,116 | 1,869 | # 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... |
adff5a3c1454d2ff7debb4abd5ae56137225bb604cb99f20eaac5450d886dbf3 | Python | 80,136 | 2,343 | import run_apt_expts_2 as rae
import sys
if sys.version_info.major > 2:
from importlib import reload
## Accuracy over time.
import run_apt_expts_2 as rae
from importlib import reload
reload(rae)
rae.setup('alice')
#rae.create_normal_dbs()
# dstr = '20200604'
# dstr = '20200706'
# rae.run_normal_training(dstr=dst... |
91d53f48981a425709cd9df28be4b1c853a5566baee190f983c51912d1ebc6c3 | Python | 80,192 | 2,067 | import heapq
import re
import warnings
import networkx as nx
import tanglegram as tg
import numpy as np
import pandas as pd
import scipy.cluster.hierarchy as sch
import matplotlib.pyplot as plt
from pathlib import Path
from scipy.spatial.distance import squareform, cdist
from tqdm.auto import tqdm
from multiprocessin... |
82d29cb94fe21ae8d26099ddf46a10f43e2f4719ee4dbde59a0634e8f58ba999 | Python | 80,232 | 1,968 | # -*- coding: utf-8 -*-
import tensorflow as tf
from .. import _logging as logging
from .core import *
__all__ = [
'Conv1dLayer',
'Conv2dLayer',
'DeConv2dLayer',
'Conv3dLayer',
'DeConv3dLayer',
'UpSampling2dLayer',
'DownSampling2dLayer',
'DeformableConv2d',
'AtrousConv1dLayer',
... |
abaea140af0b2c7a48b982a6a9e2da924dd6c3ece5f4eb3e1e7271517dd1076e | Python | 80,269 | 1,919 | # 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... |
6f4d6d7f354ba912a859bb791cd337b6be88cf1968d12c0c57683020e5bd99ba | Python | 80,504 | 1,714 | #!/usr/bin/python
# -*-mode:python ; tab-width:4 -*- ex:set tabstop=4 shiftwidth=4 expandtab: -*-
# -*- coding:utf-8 -*-
from ctypes import *
import sys
if sys.platform == 'linux2' or sys.platform == 'linux':
try:
dll = CDLL('/usr/lib/libgxiapi.so')
except OSError:
print("Cannot f... |
ee3aa4848cfe056d2a15c0ae689260486aae808faf2cd8aeabc8b047245161ff | Python | 80,681 | 1,717 | #!/usr/bin/python
# -*-mode:python ; tab-width:4 -*- ex:set tabstop=4 shiftwidth=4 expandtab: -*-
# -*- coding:utf-8 -*-
from ctypes import *
import sys
if sys.platform == 'linux2' or sys.platform == 'linux':
try:
dll = CDLL('/usr/lib/libgxiapi.so')
except OSError:
print("Cannot f... |
70c0b18bd9c255970ddd815d51dbfc9b5e25c9794d00aaa33a316fd848b1770c | Python | 81,180 | 2,140 |
# Version: 0.22
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/python-versioneer/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible with: Python 3.6, 3.7, 3.8, 3.9, 3.10 and pypy3
* [![Latest Versio... |
a835dd5c6035b8ee2e061da740280a9ed11afd94f622e6190e1c3d4399bf49c8 | Python | 81,334 | 1,797 | # 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/... |
7d8486a76e61490b4de6e75813c22fb766993b31d036ce2d9d04a5cea2b90897 | Python | 81,350 | 1,608 | # Pytorch implementation of the Lagrange model. Batch-trainable version. Used in the framework agnostic model lagrange_model.py
# In order to train the network with batches, this version makes heavy use of batched matrix notations. For better understanding, the reader is advised to read
# the model.lagrange_model_torch... |
846573fb8ed4420d305c48a9f04ec8bd02e8092b700c0fd508415a71b846710d | Python | 81,381 | 1,697 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import os
import copy
import collections
import pickle
import numpy as np
import pandas as pd
import seaborn as sns
fr... |
9e74cae8c9142960c861cff647227e33e0aef4ad87e81d195eff5983e997eb7f | Python | 81,386 | 1,763 | import pandas as pd
import numpy as np
import networkx as nx
import igraph
import ot
import dit
from dit.pid.lattice import sort_key
from astropy.stats import bayesian_blocks
from astropy.utils.exceptions import AstropyWarning
import warnings
import louvain
from scipy.stats import spearmanr, pearsonr, ranksums
from sci... |
638474c7ac8b1fed7856f1a25f42d11fb634fd97d7d8a8a77b7d062714a09175 | Python | 81,448 | 1,297 | import glob
import os.path
import string
import numpy as np
import torch
import copy
import warnings
from rdkit import Chem
from torchdrug import utils
from collections.abc import Sequence
from torchdrug.utils import pretty
from torchdrug.core import Registry as R
from collections import defaultdict
from t... |
b71f513ad4c9e4eb0236c423027a7dcd29977dd3c8dd115d385e1f6f0cc5cdb8 | Python | 81,463 | 1,922 | # 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... |
8454ec1110c0a73054f549d9146dba46df691a3a8a203cbc199d98151580f783 | Python | 81,756 | 2,048 | #!/usr/bin/env python
# Copyright (c) 2018-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 all atomic evaluation criteria required to analyze if a
scenario was completed successfully or failed.
Crit... |
32b6e03130ad629138e2b3c0349fd25afb3cc26d42cc22d345a70a463a5b6129 | Python | 81,878 | 1,999 | """The Universe-backed ``Molecule`` entity.
Provides the ``Molecule`` class for loading and visualizing molecular structures and
molecular dynamics trajectories in Blender, using an MDAnalysis ``Universe`` as the
underlying data model.
"""
import functools
import inspect
import io
import logging
import re
import warn... |
b33ab4811f241c1bb9559815aff9e1b89cb022d50becdcd5d77aa076b616140a | Python | 81,916 | 1,726 | #!/usr/bin/python
# -*-mode:python ; tab-width:4 -*- ex:set tabstop=4 shiftwidth=4 expandtab: -*-
# -*- coding:utf-8 -*-
from ctypes import *
import sys
if sys.platform == 'linux2' or sys.platform == 'linux':
try:
dll = CDLL('/usr/lib/libgxiapi.so')
except OSError:
print("Cannot f... |
aa8bc81928065597dddf478f154886d4b0d7139d7dd2377142445a6a110e7a51 | Python | 81,933 | 2,054 | #!/usr/bin/env python
# Copyright (c) 2018-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 all atomic evaluation criteria required to analyze if a
scenario was completed successfully or failed.
Crit... |
8b7a40bd375e24be8072827f4b3934e62cb257c5175e2e1fa94cf2a2959f06df | Python | 82,051 | 1,992 | from datetime import datetime
import functools
import glob
from gudhi.clustering.tomato import Tomato
import h5py
import matplotlib
from matplotlib import animation, cm, transforms, pyplot as plt, gridspec as grd
from matplotlib.collections import PathCollection
import numba
import numpy as np
from ripser im... |
0a31ed34aae82c374c6d82252201aac3dfb3f4811392053678cca1a5eeb12384 | Python | 82,208 | 1,779 | # napari + stitching libs
import os
import sys
from control._def import *
from qtpy.QtCore import *
import psutil
import shutil
import random
import json
import time
import math
from datetime import datetime
from lxml import etree
import numpy as np
import pandas as pd
import cv2
import dask.array as da
from dask.arra... |
0043faaf64193c81faad1e8661427026286a036557bc1513171da398a9edd98c | Python | 82,224 | 1,660 | """DIALOGUE: cross-cell-type multicellular program discovery.
Re-implements the algorithm of Jerby-Arnon & Regev (2022), `livnatje/DIALOGUE <https://github.com/livnatje/DIALOGUE>`__, on AnnData.
The pipeline has three phases:
1. ``fit_programs`` — pseudobulk per sample, filter informative features by ANOVA, cente... |
6734f9c47191fe151271b6b820af4156b849fef3768c3551d8aff259df98dbe3 | Python | 82,265 | 1,881 | # 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... |
fcf76a7c7119027990a644122b354aeb1d29633ba6e66cd3d5aa21f62d20f681 | Python | 82,417 | 1,865 | # 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... |
a2bb6aa0bc8aadc41455eae8857cc8f008b6757c9e07c1eaffe922bc277f8a28 | Python | 82,705 | 1,799 | # coding=utf-8
# Copyright 2021, The Facebook AI Research Team 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.or... |
b0091d440bacf589eda52293d49649df99309856882d3afd02e4279c5c94ab68 | Python | 83,156 | 1,715 | import numpy as np
from numba import int32, float64
from numba.experimental import jitclass
spec = [
('synapses', int32),
('bc', int32),
('N_units', int32),
('N_domains', int32),
('N_layers', int32),
('N_ions', int32),
('N_unknowns_unit', int32),
('N_unkn... |
907306fa50374d417adfae3096cb741ca9374286bc0b07dd9657cefa5a83980b | Python | 83,230 | 1,466 | import gc
import pickle
import timeit
import subprocess
import pandas as pd
import numpy as np
from pathlib import Path
import multiprocessing as mp
import matplotlib.pyplot as plt
from scipy.spatial import cKDTree
from collections import Counter
from scipy.stats import hypergeom
from scipy.stats import binomtest
from ... |
55860a5410dd0254b50fe4a2aa5496cf0e292c560ab2bce6c51f7c75880e6505 | Python | 83,433 | 1,970 | """
Set of classes for dealing with a particle list
# Author: Antonio Martinez-Sanchez (Max Planck Institute for Biochemistry)
# Date: 1.06.16
"""
__author__ = 'Antonio Martinez-Sanchez'
import csv
import errno
from .variables import *
from pyseg.globals import *
import pyseg.disperse_io as disperse_io
import numpy ... |
44b2ca3ec231bdc410e767f1fe4e3b6c897be070dc3fac7e59b530b6a1b8918f | Python | 83,558 | 2,084 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""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 Free Software Foundation, either version 3 of the License, or
(at yo... |
9dd38abb77aa01c9a5f5b402155c31175f151d487632e611e5579dc4b0bab711 | Python | 84,102 | 1,880 | #!/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 ... |
b956f8d4715160004dc954ce40747e55b71b15edbf414cd8c4411cd68273ae3f | Python | 84,180 | 2,194 | # -*- coding: utf-8 -*-
"""
A collections of helper functions to work with dataset.
Load benchmark dataset, save and restore model, save and load variables.
TensorFlow provides ``.ckpt`` file format to save and restore the models, while
we suggest to use standard python file format ``.npz`` to save models for the
sake... |
be319295a21cee9d4e0bd91f963d53da2dc84be2bfc3c756f9add6dbef31b132 | Python | 84,485 | 1,789 | #!/usr/bin/env python
"""
Script for fitting model to population spike counts and individual cluster
spike counts; very similart to spatiotemporal_visualisation.py, but mainly
with the addition of Bayesian model fitting. Relies on some functions in
spatiotemporal_visualisation module, including spk_train_nw (computing
... |
2d76e789f64a9434e97c7e7c339388ffcc48bf7a51dabb934fed39c4edd5a673 | Python | 84,543 | 1,472 |
from .createc_control import Createc_Controller
from .img_attrib import mol_property
from scipy.spatial.distance import cdist as cdist
import pandas as pd
import numpy as np
import os
from matplotlib import pyplot as plt, patches
import cv2
import datetime
from .img_conv import ResNet18, NormalNet, ResNet
f... |
646f0468bfeaa8e611ee4851266d35aabfd4b0284df8c6b405ea410344cd1b34 | Python | 84,678 | 1,729 | import sys
import os
import csv
import cv2
import pydicom.errors
from pydicom import dcmread
from pathlib import Path
from skimage.morphology import reconstruction
from PyQt6.QtWidgets import QWidget, QTableWidgetItem, QSlider, QLabel, QGridLayout, QHBoxLayout, QFileDialog, QMainWindow, QGraphicsView, QProgressBar, QM... |
81548bca2315f6d0afab4d3c577419e35716addb1f0027f2c40ecf2909d0062c | Python | 84,833 | 1,957 | # 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... |
c588044845f4d8ee3e32fb492abd1d0edb0546ff9aef0bfca71fb5f6a5321012 | Python | 84,971 | 1,735 | import sys
import os
import csv
import cv2
import pydicom.errors
from pydicom import dcmread
from pathlib import Path
from skimage.morphology import reconstruction
from PyQt6.QtWidgets import QWidget, QTableWidgetItem, QSlider, QLabel, QGridLayout, QHBoxLayout, QFileDialog, QMainWindow, QGraphicsView, QProgressBar, QM... |
92208ec43a6bb25eea6bcfdab9252d6319f3d451856230985ac78899d2ab04dd | Python | 85,484 | 1,593 | # coding=utf-8
# Copyright 2020, The RAG 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/LICENSE-2.0
#
# Unless r... |
74f7dc202e72adfc708b001a37bb2830d310f4f76830edb7969311feff435a89 | Python | 85,558 | 2,155 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (C) 2020 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 Free Software Foundation, either version 3 of the License, or
(at yo... |
fde0fcbc53446579214566b1d7e4380be0813a51cc706c668019885556af02cd | Python | 86,245 | 2,362 | #!/usr/bin/env python
#
# Copyright 2019 Murdoch Children's Research Institute,
# Melbourne, Australia
#
# 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... |
bc3cb0f1a259969f914f4af40be575c649a018c28948838fec35691adda7dc69 | Python | 86,449 | 1,713 | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 24 10:54:23 2023
@author: alpha
"""
datasets = {
'mouseID_404421-182720':{
'url':[
'https://download.brainimagelibrary.org/2b/da/2bdaf9e66a246844/mouseID_404421-182720/CH1', # full res
'https://download.brainimagelibrary.or... |
e08f962dbc65ccf84062f1aff4a87325f1ba283e80b5d68f55ce33828788c0eb | Python | 86,493 | 2,366 | """
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://setuptools.pypa.io/en/latest/deprecated/easy_install.html
"""
from glob impor... |
935de881a1be4a97a4b8297961e098e87bc7da51c84ce1600febc8799188df87 | Python | 86,780 | 2,248 | # flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... |
d6eaa2fd14a523b828b3878907f344577779c10c334d4407777fe3ae46d3a3c4 | Python | 87,149 | 2,296 | import abc
import collections
import collections.abc
import operator
import sys
import typing
# After PEP 560, internal typing API was substantially reworked.
# This is especially important for Protocol class which uses internal APIs
# quite extensively.
PEP_560 = sys.version_info[:3] >= (3, 7, 0)
if PEP_560:
Gen... |
7c90dcea68a9b1bf5c39f53e381ee2b1185877e8b9a0839781f9dcee02376a37 | Python | 87,419 | 2,607 | import copy
import json
import numbers
import os
import pickle
import re
import shutil
import yaml
import pprint
import traceback
import torch
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import tqdm
import utils as u
import plotly.express as px
import plotly.graph_objs... |
d7b0f9afc00e09116abc6ae0a2ed229f80c477ea7ed982339dd57b10c8632b18 | Python | 87,497 | 1,912 | import sys
import scanpy as sc
import anndata
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import cell2location
import scvi
from matplotlib import rcParams
rcParams['pdf.fonttype'] = 42 # enables correct plotting of text
import seaborn as sns
fpath = "/scratch/mshru... |
2749515e4fa59f06860c4be028cd65f73dda8d62f3f1307bbb248087766a25b9 | Python | 87,569 | 3,258 | from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
from time import perf_counter
from types import SimpleNamespace
from typing import Any
import json
import numpy as np
import pandas as pd
from .config import (
PipelineConfig,
PIPELINE_STAGES,
)
from .compute impor... |
b4e95075c4d3af2b3928cafef1de7703097819d1b69232d902bcadb4a283bcdf | Python | 87,602 | 1,916 | #!/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... |
fa933a4009858b246ef5fd14e9bb54ce2fdbef09f1bb4fd9c125b7983e49e93f | Python | 87,905 | 1,975 | DEVMODE = True # Set to `False' for excluding the corrupting effects of bug-ridden coding experiments
import sys
import os
CWDIR = os.getcwd()
MANDIR = 'man'
MANPREF = "pyclamp"
MANSUFF = ".html"
MANHELP = [""]
DEFAULT_TDF_EXTENSION = ".tdf"
import gc
import webbrowser
from PyQt6 import QtGui
import numpy as np
impo... |
3e104629f32b38046919ff074d335e774125400b8b43760dccfa7a61b4eab3af | Python | 88,841 | 2,030 | #!/usr/bin/python
# -*- coding:utf-8 -*-
# -*-mode:python ; tab-width:4 -*- ex:set tabstop=4 shiftwidth=4 expandtab: -*-
import numpy
from gxipy.gxwrapper import *
from gxipy.dxwrapper import *
from gxipy.gxidef import *
ERROR_SIZE = 1024
PIXEL_BIT_MASK = 0x00ff0000
if sys.version_info.major > 2:
INT_TYPE = int
... |
79340b9a1687c2f2343a9391609e6750cff49f02eea1b3f77e15ff8d1e870816 | Python | 88,854 | 2,055 | #!/usr/bin/python
# -*- coding:utf-8 -*-
# -*-mode:python ; tab-width:4 -*- ex:set tabstop=4 shiftwidth=4 expandtab: -*-
import numpy
from control.gxipy.gxwrapper import *
from control.gxipy.dxwrapper import *
from control.gxipy.gxidef import *
ERROR_SIZE = 1024
PIXEL_BIT_MASK = 0x00ff0000
if sys.version_info.major ... |
01f3b0af6d8ae6ee36c3a76bec86e76b031f8b897e33dccbd5ea367497444246 | Python | 89,366 | 1,982 |
"""
MoCHI model module
"""
from loguru import logger
import os
import bz2
import pickle
import _pickle as cPickle
import torch
from torch import Tensor
from torch.nn import functional as F
from pymochi.data import *
from pymochi.transformation import get_transformation
import itertools
import shutil
import functools
... |
655cf4bf37228ccc642f9201f5a39e325e85a3fe5204f84ef6098c72e344d9de | Python | 89,369 | 2,603 | info = [{}]
info[-1]['id_trk'] = '/groups/branson/home/kabram/temp/ma_expts/alice/trks/nochr_TrpA65F12_Unknown_RigB_20201212T163629_grone.trk'
info[-1]['mov_file'] = '/groups/branson/home/bransonk/behavioranalysis/code/MABe2022/data/nochr_TrpA65F12_Unknown_RigB_20201212T163629//movie.ufmf'
# info[-1]['mov_file'] = '/ne... |
80f78ae062de99081ae228ca7d61f784dd056a0a8a85c3005ccbb53584afcc3a | Python | 89,664 | 2,361 | """
Collection of simple classification pipelines suitable for
different type of data.
Results are automatically saved to the directory of each
dataset.
"""
import numpy as np
from os.path import join
from mne.filter import filter_data
from scipy.signal import hilbert
from sklearn.model_selection import cross_val_s... |
282a0321d86f938d8f57481596e799cdb1dfd66067e22d2e777201ed8dd12a8a | Python | 89,698 | 2,076 | """Functions associated with the SMART model class
"""
import pickle
from collections import OrderedDict as odict
from dataclasses import dataclass
from decimal import Decimal
from itertools import chain
import logging
import dolfin as d
import numpy as np
import pandas
import petsc4py.PETSc as PETSc
import sympy as s... |
c6b803c9cac6482cb7edb557d5f5610caf61f42535ae0c332331da181bb85e48 | Python | 89,851 | 1,845 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors, Facebook AI Research 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 L... |
9058df0f7f528e852de85e4dfcc822a4f9a2fe3dce3477c7a740f7c1cfdf972f | Python | 90,157 | 2,092 | from __future__ import division, unicode_literals, absolute_import
from builtins import int, range, dict, map, zip
import os
import io
import re
import sys
import queue
import traceback
import threading
# pip allows tombo install without correct version of mappy, so check here
try:
import mappy
if sys.versio... |
e1e305d198feb834129a4cc45992226c2efb0a32d299e8fb86752a89e8c6052d | Python | 90,406 | 2,325 | """Dialogs for analyses, such as power spectra, PAC, event parameters
"""
from logging import getLogger
from numpy import (abs, angle, asarray, ceil, diff, empty, floor, inf,
logical_and, logical_or, mean, ravel, stack, zeros)
from functools import partial
from csv import writer
from os.path import ... |
8914fe71401157338a3c7701a2f03c2648ad9cdb2e547c60bfb36c9d19d0d87c | Python | 90,651 | 2,060 | # 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... |
86a044fe75ad2710a7999121a5746434af3a3df1d663187e45ed19f2ac7137fd | Python | 90,746 | 1,723 | """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... |
55962fb2ac1a178235f8b5a17d4ffb0eca8908c5b53938b5f5495f585059c912 | Python | 90,762 | 2,470 | #
# Testing module for ACME's `ParallelMap` interface
#
# 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 packag... |
c13430a4996019cd07de8fc1490c972c8bc3169273377d15c0d3da8914afe8c1 | Python | 90,918 | 3,848 | # these are some data dictionaries that are used throughout the addon
# Usually it's for converting things like Amino Acid names into their
# numerical representation in alphabetical order, or converting the name
# of an element to its atomic number etc
# elements dictionary format:
# keys are the element symbol fo... |
c3a0d6f7d33577529e9e3fd82ebb347c4e66883badfb1f8ee989068651d9478e | Python | 90,980 | 1,659 | # -*- coding: utf-8 -*-
"""
Created on Tue May 31 10:09:38 2022
@author: Dalton
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from matplotlib import colormaps
import dill
import os
import re
import seaborn as sns
from scipy.stat... |
af5aa962df78bc73a683039cef7a51433231759343b543e2fda353d29892a0d5 | Python | 91,019 | 2,288 | from __future__ import division, print_function
import copy
import fnmatch
import os
import subprocess
import wave
import struct
import hashlib
import h5py
from copy import deepcopy
from math import ceil
from numpy.fft import fftshift, ifftshift
from numba import jit
import librosa
import numpy as np
from scipy.io.wa... |
643a02bd455e34a69c4458dd3f86655e19afca20d53d1569ed37d307bee7b2f6 | Python | 91,088 | 1,660 | # -*- coding: utf-8 -*-
"""
Created on Tue May 31 10:09:38 2022
@author: Dalton
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from matplotlib import colormaps
import dill
import os
import re
import seaborn as sns
from scipy.stat... |
4b2dcf19f3f6dae58fba52ead22bb98728a82acc445886984ee93c4bde251c01 | Python | 91,213 | 1,730 | """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... |
5f6e857665a823ba6e7e7c86390c475beef883078765fde032fe40748db6485d | Python | 91,342 | 2,122 | import pickle
from pathlib import Path
import numpy as np
import openturns as ot
import seaborn as sns
from sklearn.neighbors import KernelDensity
ot.Log.Show(ot.Log.NONE)
import matplotlib.pyplot as plt
from scipy.interpolate import UnivariateSpline
from uptake.figures.utils import CreateFigure, Fonts... |
b014e78415991d06f50a77875a23d7f97af1b3cf3e79222c37be35a8f65ce4fe | Python | 91,755 | 2,117 | """
Tests module rigid_3d
# Author: Vladan Lucic
# $Id$
"""
from __future__ import unicode_literals
from __future__ import division
from builtins import range
#from past.utils import old_div
__version__ = "$Revision$"
#from copy import copy, deepcopy
import unittest
import numpy as np
import numpy.testing as np_te... |
470bfcfa6f6d99f7c2bb56649f538570419f900bda4d6756f17c3544f896c74b | Python | 91,791 | 2,379 | import os
import random
from ast import literal_eval
from datetime import datetime
import glob
import math
import time
import subprocess
import yaml
import numpy as np
import pandas as pd
from scipy.io import loadmat
from scipy.stats import ks_2samp
from scipy.signal import convolve
from scipy.integrate import solve_... |
29acbdf43002fa9ff7a301c2750551d70774d7db995e2323070e0c9880395a0e | Python | 91,841 | 1,825 | import multiprocessing
import os
import numpy as np
import pymp
# import matplotlib
# matplotlib.use('tkagg') # For use on CSCS daint
# from matplotlib import pyplot as plt
from matplotlib.gridspec import GridSpec
import matplotlib.animation as animation
from matplotlib import pyplot as plt
import seaborn as sns
# imp... |
f64c302563a5d5d5250793ea6adc307491c4aa9d335ae1279de2958489803378 | Python | 92,521 | 2,464 | """Module to keep track of the user-made annotations and sleep scoring.
"""
from logging import getLogger
from bisect import bisect_left
from itertools import groupby
from csv import reader, writer
from json import dump
from datetime import datetime, timedelta
from numpy import (allclose, arange, around, asarray, clip,... |
327f286106ef2f73820dd0d8f15caaa205a0ee899344a51064fb11e6acf33f07 | Python | 92,553 | 1,910 | """Batch 2D registration tab: a queue of single-2D runs with shared-default +
per-row orientation, two points modes, settings persistence, and a sequential
job controller (run loop added in a later task)."""
from __future__ import annotations
import os
import sys
import math
import time
import shutil
impor... |
1b4d1ea50f466b9dd354957f50203b126a2792f83198d18b7ba173e9b4379ed4 | Python | 92,760 | 1,919 | # Pytorch implementation of the Lagrange model. Trainable only with single samples. Just for reference.
# This is the version that is easier to read as it is without matrix-batch notation.
#
# Authors: Benjamin Ellenberger (benelot@github) and Nicolas Deperrois (nicozenith@github)
import time
import numpy as np
impo... |
0c1a9fcb67e3d4b5d50806339c19a9ebcc815db3f5a7213b7b08d406680afd79 | Python | 92,802 | 2,266 | """
Defines class Groups that can hold data form one or more observations
(experiments) divided (classified) in groups.
# Author: Vladan Lucic (Max Planck Institute for Biochemistry)
# $Id$
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from builtin... |
7c744c4c7b43220469792f45c33d5cfd2ce69fb620a27605e9166d879fcac2f2 | Python | 93,236 | 2,460 | #!/usr/bin/env python
# Copyright (c) 2018-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 all atomic scenario behaviors required to realize
complex, realistic scenarios such as "follow a leading veh... |
efb91172ab6b39261b9b7aaddbdca4776d4046fc81d124bf300d25970932ebbd | Python | 93,489 | 1,677 | # -*- coding: utf-8 -*-
"""
Created on Tue May 31 10:09:38 2022
@author: Dalton
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from matplotlib import colormaps
import dill
import os
import re
import seaborn as sns
from scipy.stat... |
26446fc143e87f7a9ab0705a4f2c9dd830d6e703f9813e5114d77ba66c68b312 | Python | 93,491 | 2,587 | # 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... |
7524975b4ae0fab3eba8fc823148e17112b7818281eaadd772194b9372d3a865 | Python | 93,903 | 1,675 | # -*- coding: utf-8 -*-
"""
Created on Tue May 31 10:09:38 2022
@author: Dalton
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from matplotlib import colormaps
import dill
import os
import re
import seaborn as sns
from scipy.stat... |
a88fcb3c8c1bc4b066a77874abc1b9d51bfa1b8bafe866c78fa2103369512e27 | Python | 94,504 | 1,830 | # coding=utf-8
# Copyright 2020, The RAG 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/LICENSE-2.0
#
# Unless r... |
352139a1308b10ba401fe8cc869d2323f0f9ff5907ddc4b97f4e4f83905225e5 | Python | 94,582 | 2,246 | """Interactive GUI viewer for manual contour correspondence editing.
Displays two side-by-side panels:
Left - Registered volume (user draws curves here)
Right - Average template (auto-generated CA3 contour by default,
configurable via ``region_ids``)
Users can pick, place, and edit control-point... |
9582530627f9d6ad60389430665bf6420ca8143c8946e27eb933a5157373da42 | Python | 94,689 | 2,172 | """
Wrapping classes for using graph-tool package
# Author: Antonio Martinez-Sanchez (Max Planck Institute for Biochemistry)
# Date: 02.01.15
"""
__author__ = 'martinez'
try:
from globals import *
except:
from pyseg.globals import *
# import pyseg.globals as gl
import pyseg.disperse_io as disperse_io
import p... |
760cd2763f73eef370a3524bbabb4417e743a438a8b04757a3dbd8fa63d89271 | Python | 95,109 | 1,974 | """
Classes for extending GraphMCF functionality for membranes
# Author: Antonio Martinez-Sanchez (Max Planck Institute for Biochemistry)
# Date: 03.11.15
"""
__author__ = 'martinez'
from pyseg.globals import *
from pyseg.graph import GraphGT
from pyseg import disperse_io
from pyseg import pexceptions
import math
im... |
5d8d1e19d4c8cb8790f578352d53d969c6fe501847051f9cab42293d51e8c0a7 | Python | 95,372 | 4,380 | from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
TURKISH_LANG_MODEL = {
23: { # 'A'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0, # 'F'
36: 0, # 'G'... |
469c18171e494de0a48bfce549ea0bf8bccd25f3b702d7cbc105a546e26a2fb2 | Python | 95,712 | 2,667 | """
Module for feeding ThorLabs imaging datasets into a 2p imaging analysis
pipeline
(c) 2015 C. Schmidt-Hieber
GPLv3
"""
from __future__ import print_function
from __future__ import absolute_import
import os
import sys
import shutil
import time
import pickle
import tempfile
import multiprocessing as mp
import subpro... |
ef030d89e38414c92e7402577b0b2ad00d50be4f5da980ad7e2d894f20f9a1ba | Python | 96,656 | 2,403 | """
Contains class Segments for manipulation of segmented image where segments do
not touch each other.
# 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 str
from ... |
38e5e0d8907f402eaa4511dc09812bce5171e42527cf015197e1392b53e02dcd | Python | 96,679 | 2,457 | from __future__ import print_function
## ####################### SETUP
# data_type = 'alice'
# data_type = 'stephen'
# data_type = 'roian'
# data_type = 'brit2'
import APT_interface as apt
import h5py
import PoseTools
import os
import shutil
import subprocess
import time
import glob
import re
import numpy a... |
b87242b1539cdd3161367526231ad29bb3c846198cb66684cc1bdb2120cbc220 | Python | 97,227 | 2,730 | # -*- coding: utf-8
"""
An API for describing a typed lambda calculus, and methods for enumerating and
executing expressions in that language.
"""
from collections import defaultdict
from copy import copy, deepcopy
import functools
import inspect
import itertools
import logging
import operator
import re
from nltk.int... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.