sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
c28e28fb04a5a1c5a6c132d042c9d48ad53df97f7c9148eaf1d77c1f979fc68a | Python | 49,496 | 741 |
import h5py as h5
import numpy as np
import sys
import ArgParser as argp
from scipy.signal import find_peaks
import PatchAnalPlots as pu
import spike_utilities as su
HEADSTAGE_V={'H1':'_S2_', 'H2':'_S4_'}
HV_VAL_KEY={v:k for k,v in HEADSTAGE_V.items()}
HEADSTAGE_I={'H1':'_S1_', 'H2':'_S3_'}
CURRENT_THRESH=5e-12 #det... |
bb3cfae033d1a2e10f9ee63d88b808b2115b58bcc711093de68fcd16d1e83804 | Python | 49,556 | 1,117 | """
Created on Wed Mar 25 19:31:32 2025
@author: Sophie Skriabine
"""
import os
import matplotlib
if os.environ.get("WAVEN_NO_PLOTS") == "1":
matplotlib.use("Agg", force=True)
else:
matplotlib.use("TkAgg", force=True)
import numpy as np
from .suite2p.utils import cortex_lab_utils as clu
from .suite2p.utils i... |
d0ca645e74b1a4ffda28ac060fecb18fbe15eb70278b95c426aaeb190f4dfa61 | Python | 49,644 | 1,169 | import pandas as pd
from Bio import SeqIO
from collections import Counter
import itertools
import argparse
import sys
import os
import time
import logging
import tempfile
import uuid
from multiprocessing import Pool, cpu_count
# Need vstack for combining sparse matrices
from scipy.sparse import dok_matrix, save_npz, l... |
498c3361e81e7a40e38fce6d78a386dd68fb26443fa7c785d9786d4dfd11d8fc | Python | 49,672 | 1,035 | import argparse
import json
import traceback
import tifffile
import torch
import torch.nn as nn
from glob import glob
from os.path import isfile, isdir, join, basename, splitext, sep
from os import makedirs
import celldetection as cd
import pytorch_lightning as pl
import numpy as np
from torch.utils.data import DataLoa... |
fa49358e5c7a35a2029a9d379f6d4dda48fca9e75c56d4931b68972cd825ed6e | Python | 49,832 | 1,106 | import os
import json
import time
import numpy as np
from tqdm import tqdm
from pathlib import Path
from datetime import datetime
import matplotlib.pyplot as plt
from collections import defaultdict
import torch
from torch.amp import autocast, GradScaler
from ..loss import CLoss
from .metrics import calculate_graph_me... |
6720000bb0bc44a4c629ffa1d1d25fbbd3ac5de539548abd68e0abbac347988e | Python | 49,917 | 1,065 | '''
Created on Nov 7, 2022
@author: Yanay Rosen
'''
import os
os.environ["OMP_NUM_THREADS"] = "4" # export OMP_NUM_THREADS=4
os.environ["OPENBLAS_NUM_THREADS"] = "4" # export OPENBLAS_NUM_THREADS=4
os.environ["MKL_NUM_THREADS"] = "6" # export MKL_NUM_THREADS=6
os.environ["VECLIB_MAXIMUM_THREADS"] = "4" # export VEC... |
bdaf38f6455cb6cc8edd68eeaf986d2f80c8b9ba5584472e4fcb4b162b10b4ad | Python | 49,985 | 1,300 | import os
# disable DLC GUI
os.environ["DLClight"] = "True"
from deeplabcut.utils import plotting
from deeplabcut.utils import video_processor
from deeplabcut.utils import auxiliaryfunctions
import deeplabcut as dlc
from IPython import display
import pylab as pl
import math
import yaml
import ruamel.ya... |
bee7e668d793acb9afc19429e0c9699c4d66377257a39621766c241ef5469145 | Python | 49,994 | 1,106 | from labdatatools.analysis import *
import argparse
from pathlib import Path
import cv2
import tkinter as tk
from PIL import Image, ImageTk
from threading import Thread
import threading
from queue import Queue
import time
class AnalysisDeeplabcut(BaseAnalysisPlugin):
def __init__(self,subject,
ses... |
5d7cc921650e65804009715eab07756a5d3e2357e8d7d25a645107b0e66da856 | Python | 50,073 | 1,045 | from qtpy.QtCore import Signal
from pathlib import Path
from napari import Viewer
from napari.qt.threading import thread_worker
from natsort import natsorted
import cv2
from superqt import QCollapsible
from qtpy.QtWidgets import QPushButton, QWidget, QVBoxLayout, QMessageBox, QProgressBar
from magicgui import magicgui
... |
4bd9e7a030f1b433530b22abfbb8a6c6ebd3a8e7b05eea3606adc5d45cc5ab61 | Python | 50,166 | 1,400 | # Copyright 2024 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
adcba8461f5325916c4f3e116c3321dc0cdc960f262ba01427d699d585c724ec | Python | 50,173 | 1,137 | """Network topology measured at matched connection density.
Every graph metric MEA-NAP computes depends on how many edges the network has,
and on the Yin timecourse density rises from ~0.35 to ~0.98 across development.
A difference in clustering or efficiency between two groups at their own
densities therefore cannot ... |
ec8750bb876be7aa8f688d7aecc3872c2b899e8606ba841a322d91a7b837ef2d | Python | 50,178 | 1,404 | # Copyright 2024 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
b5dc0a70588c470bba8e1ecf1bea31d5dec9ed970b5f0951eb1436606d5f05d5 | Python | 50,308 | 1,378 | import numpy as np
import pandas as pd
import networkx as nx
import torch
import copy
import itertools
from pymatgen.core.structure import Structure
from pymatgen.core.lattice import Lattice
from pymatgen.analysis.graphs import StructureGraph
from pymatgen.analysis import local_env
from networkx.algorithms.components... |
fc01a42e84ab8a31c2e06a6a5a715d20a25b73699c518d31b5cf533cd434e478 | Python | 50,338 | 1,570 | """Data preparation pipeline for Explainable Boosting Machine models.
This module exposes a reusable API and CLI for cleaning, transforming, and preparing
transcript-level datasets for both model training and inference.
Modes:
- Training Mode: Cleans, transforms, and splits data for model training
- Inference... |
2d857f0090cf93675d72468b8387d33d72e5a4507716873194574dd4aa68eeb7 | Python | 50,364 | 1,089 | # Kai Sandbrink
# 2023-05-27
# This script compares behavior and transdiagnostic scores
# %% LIBRARY IMPORT
from matplotlib.ticker import FuncFormatter
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
from scipy import stats
import seaborn as sns
import statsmodels.api as sm
from sklea... |
4cfd417a5d3d4d6298c1e93fcebeb1965a23b259ce712a0a2e3ce84198bc0d49 | Python | 50,535 | 946 | import pdb
import models
import torch, torch.nn as nn
import cv2
from torch.autograd import Variable
import sys, os, time, math, numpy as np
sys.path.append("/LiNet")
import torchvision.utils as vutils
import YuSmith.lib.irnet as irnet
import YuSmith.lib.torch_util as tu
import torch.optim as optim
# from LiNet impor... |
63bbc459f4ab25fd09146466fd3d6dfb0c6db9c81de790d3ddec9b231530a61f | Python | 50,574 | 1,244 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import ast
import functools
import glob
import inspect
import math
import os
import platform
import re
import shlex
import shutil
import subprocess
import sys
import time
from importlib import metadata
from pathlib ... |
a9e2ed8ec756900ca3476c3565a3f110cd6e597f3539181feeb567d1b03aebf2 | Python | 50,618 | 1,221 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import asyncio
import hashlib
import json
import math
import os
import random
import shutil
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor, as_completed
from pathlib import Pat... |
90a19255b27a992f45dce9a2050e6f305e50898cb78141618b5cefb1d21e7173 | Python | 50,621 | 939 | import logging
import os
import pickle
from pathlib import Path
from typing import List
import atom3.database as db
import atom3.pair as pa
import numpy as np
import pandas as pd
import torch
from Bio import SeqIO
from Bio.PDB import Selection
from Bio.PDB.DSSP import dssp_dict_from_pdb_file, DSSP
from Bio.PDB.Polypep... |
3408f8b742c015aaadce7fa324c273a7521a4b2fe3d244a7d0f349408c801fa2 | Python | 50,637 | 1,141 | """Contains the fixtures that are needed for the unit tests."""
import json
import os
import random
from typing import Iterator
import h5py
import numpy
import pytest
import yaml
from flask import Flask
from flask.testing import FlaskClient
from PIL import Image
from pytest import TempPathFactory
from virelay.model ... |
1602d1e8c759292321776e78184d1cbe48e79702f1b8254063f06e8f048e0d6a | Python | 50,647 | 1,255 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import re
import shutil
import matplotlib
matplotlib.use("Agg") # headless
import matplotlib.pyplot as plt
import numpy as np
from datetime import datetime
from mpl_toolkits.axes_grid1.inset_locator import (inset_axes, mark_inset)
def determine_cryst... |
83b4711f9f299b516fe8305e2d98ab9fdc3ec1be80f71871217876a5ea8ee1f6 | Python | 50,720 | 942 | import logging
import os
import pickle
from pathlib import Path
from typing import List
import atom3.database as db
import atom3.pair as pa
import numpy as np
import pandas as pd
import torch
from Bio import SeqIO
from Bio.PDB import Selection
from Bio.PDB.DSSP import dssp_dict_from_pdb_file, DSSP
from Bio.PDB.Polypep... |
2029d8aa2bd152f4c0a54f756d89bd0fb87dbd9f0358223b6a67c7f60e4814dd | Python | 50,752 | 1,225 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
"""Configuration handling and command-line interface (CLI) entrypoint for Ultralytics YOLO."""
from __future__ import annotations
import ast
import os
import shutil
import subprocess
import sys
from pathlib import Path
from types import SimpleNamespa... |
65c00892c6688043a2f1e03177173ceadbb6addb151f63fbe3904223758a0a72 | Python | 50,993 | 962 | # Kai Sandbrink
# 2022-10-27
# This script completes the analyses the pure explore vs. pure exploit task (Task 1)
# %% LIBRARY IMPORTS
import torch
import pandas as pd
import numpy as np
from utils import Config, plot_learning_curve, plot_learning_curves_comparison, get_timestamp
from test_case import test, test_help... |
e04b395b801d758e830ab872ea1772a25b90d24589b6362829c431d597cdbb87 | Python | 51,087 | 1,160 | # Dataset utils and dataloaders
import glob
import logging
import math
import os
import random
import shutil
import time
from itertools import repeat
from multiprocessing.pool import ThreadPool
from pathlib import Path
from threading import Thread
import cv2
import numpy as np
import torch
import torch.nn.functional ... |
7ac502941561dece6062a96e86631b1c0d29e873bbafd3ffa76823efc6acc7dd | Python | 51,342 | 1,444 | # Copyright (C) 2019-2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import io
import itertools
from collections import OrderedDict, defaultdict
from collections.abc import Callable, Generator, Sequence
from contextlib import nullcontext
from copy import deepcopy
from enum i... |
9dcdf9b7be04a15510d87fc66f860226f588e1b93382b3ebdbcfb3b60aad5b8e | Python | 51,428 | 1,177 | """
This script looks for new jobs and executes them if not already present.
"""
import os, glob, configparser, logging, json, copy, re, numpy as np, pgzip, joblib as jl, \
scipy.spatial.transform, string, random, lzma, shutil, tifffile, numba as nb, traceback, gc
from config import CONFIG
from tqdm import ... |
0e23253f2db9e370c0ebe0468aa518592941f00e1e4e9fe363ad52517afa936d | Python | 51,465 | 1,027 | import copy
import glob
import os
import pickle
import matplotlib
matplotlib.use("agg")
import matplotlib.pyplot as plt
from textwrap import wrap
SMALL_SIZE = 8
MEDIUM_SIZE = 9
BIGGER_SIZE = 10.5
plt.rc('font', size=SMALL_SIZE) # controls default text sizes
plt.rc('axes', titlesize=BIGGER_SIZE) # fontsiz... |
727a189da0499c5b0d90afc77ed907503bae5236b46a15737a4c1f20dc8d643c | Python | 51,504 | 1,244 | # -*- coding: utf-8 -*-
"""
Created on Wed May 7 12:11 2025
@author: Cristiana Pinheiro
"""
import sys
source_path = 'C:/Users/neuro/Desktop/Cristiana/paper_insula/githubINS/'
sys.path.append(source_path+'ft-insulaOS/ENIGMA')
sys.path.insert(0,source_path+"ft-atlas/src/scripts")
print('You need to change these paths d... |
f6b3f6466003c25604aec41401b45bbd643c820e2f0ae40d48391aee096a7847 | Python | 51,559 | 1,231 | #!/usr/bin/env python
import os
import sys
import json
import glob
import argparse
import shutil
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime
import re
import subprocess
from pathlib import Path
import traceback
from scipy.signal import find_peaks, peak_widths
from scipy.interpolat... |
f6a60a17e4fbe243c620f4678f7788ec305bbe3a3b380488fee672a4f6a5127a | Python | 51,785 | 603 | # /------------------------------------------------------------------------------+
# | 22-AUG-2022 |
# | Copyright (c) Bone Imaging Laboratory |
# | All rights reserved ... |
7ae55975c80db72730a84b2eeb7347894114e8f77dcd7bc0d19b0d6720f2c30e | Python | 51,938 | 1,314 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
from copy import deepcopy
from http import HTTPStatus
from itertools import product
import pytest
from cvat_sdk.api_client.api_client import ApiClient, Endpoint
from deepdiff import DeepDiff
from shared.utils.config import (
delete_method,
... |
7d68efd61dfbedc9e52039e525a45292a3e549aa990908f58e43d60a35a8932b | Python | 51,972 | 981 | '''
File to run the EEG experimental sessions. In brief, this will
present the passive listening trials (with some attention checks,
i.e. choice-based trials) of clear words, the passive listening
trial(s) of narrative listening plus comprehension questions,
then runs the main experiment (i.e., speaker-specific semant... |
54675d3d50c0d55418e5bb00fddfaebe4da49d00a03ad131e2ce1886cefd0db3 | Python | 52,098 | 1,167 | """Step 4: network activity metrics, port of ``ExtractNetMet.m`` (see
``network_metrics.py`` for exactly which metrics are and aren't in scope,
and which are deterministic vs. dependent on a stochastic null model).
"""
from __future__ import annotations
import json
import time
from pathlib import Path
from typing imp... |
17345664593006ad02cfa362fd233dca97d37b613b7e570be6886cd8371e01fc | Python | 52,109 | 1,415 | """ generators for the neuron project """
# general imports
import sys
import os
# third party imports
import numpy as np
import nibabel as nib
import scipy
from keras.utils import np_utils
import keras
import keras.preprocessing
import keras.preprocessing.image
from keras.models import Model
# local packages
impor... |
819c1caed152a1e0ee07f160526453d870af76e6b46e7a9c3d841e252249a513 | Python | 52,154 | 1,389 | # -*- coding: utf-8 -*-
"""
This module regroups small operations and util functions for tractogram.
Meaning that these operations are applied on the streamlines as wholes (ex,
registration, suffling, etc), not on each point of the streamlines separately /
individually. See scilpy.tractograms.streamline_operations.py ... |
11944dfb7655dc7ca2ba22b5e0cce7e62cc818527a800e361bc8f8f44df7061d | Python | 52,235 | 1,222 | # Import packages
import warnings
warnings.filterwarnings("ignore")
import setuptools
import argparse
import os
import random
import time
from distutils.util import strtobool
import gym
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.distributions.categorical import Categor... |
2a43db0dc608e3a18f9df874df7426bea3de44f6b26a30ec58d46ddb272686f5 | Python | 52,290 | 1,116 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 27 10:53:04 2020
@author: Cristian
"""
# Brian2 simulator and helpers
from brian2 import *
from brian2tools import *
# Numerics / plotting
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal
import math
import ... |
34ec0ef04545835691a2ae27a779775657497e0d7ab323973f213f2b119c734b | Python | 52,334 | 1,442 | '''
Estimators to make analyses quick and easy.
'''
from .math import *
from . import estimators_torch as torch
import numpy as np
import sklearn, scipy
from sklearn.preprocessing import StandardScaler
from typing import Any, Union, Callable, Dict
class TimeDelayed(sklearn.base.BaseEstimator):
'''
Create a ... |
d57ce40ba3c85205ef216582ddf005aa63ecd0dca61641f128beb1d23278b9a9 | Python | 52,412 | 1,377 | import os
from typing import List, Dict, Union
import re
import logging
from enum import Enum
from pathlib import Path
from deprecated import deprecated
import flair
from flair.data import Sentence, Corpus, Token, MultiCorpus
from flair.file_utils import cached_path
log = logging.getLogger("flair")
class NLPTask(E... |
fcb1a05f6badaad8eb2b6d7ace195df30ccd8fec3984a9df1ce9eb13a46cbc7a | Python | 52,483 | 1,063 | """Tests for yasa/evaluation.py — EpochByEpochAgreement and SleepStatsAgreement."""
import re
import unittest
import warnings
import numpy as np
import pandas as pd
import pytest
import scipy.stats as sps
from yasa.evaluation import EpochByEpochAgreement, SleepStatsAgreement
from yasa.hypno import Hypnogram, simulat... |
953ebd67891b988531bb478860d956cae9a3fabe5d307177f31b3cc240543904 | Python | 52,629 | 1,492 | # Copyright (C) 2021-2023 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
from __future__ import annotations
import functools
import io
import json
import os
from abc import ABC, abstractmethod
from collections.abc import Callable, Iterator, Sequence
from concurrent.futures impo... |
3cfa21765c7d74d51597bd24b9ea116cf2b526867ce31818d9d7f57c49ee3554 | Python | 52,789 | 266 | import numpy as np
import pandas as pd
import networkx as nx
import matplotlib.pyplot as plt
from numpy import array
import os
import csv
# path1 = r'C:\Users\YHR\Desktop\YHR\硕士\符号网络\数据\议员数据\投票数据\20230926_voteview_50.xls'
# path2 = r'C:\Users\YHR\Desktop\YHR\硕士\符号网络\数据\议员数据\投票数据\vote_nodes50.txt'
# path3 = r'C:\Users\... |
2b98a16a93cce7775e4c8c393f740306af7ab8ab57babd5900265a6978ff4c7f | Python | 52,852 | 1,372 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import itertools
import json
from copy import deepcopy
from http import HTTPStatus
from types import SimpleNamespace
from typing import Any
import pytest
from cvat_sdk import exceptions, models
from cvat_sdk.api_client.api_client import ApiClient, E... |
4dc05f72071906dd1c4b9ceded2c5e4450303e98483cdb249cc7f5ed73c06e62 | Python | 52,903 | 1,189 | """Local, cross-platform browser interface for metaprivBIDS."""
from __future__ import annotations
from dataclasses import dataclass, field
from io import BytesIO
import json
import os
from pathlib import Path
from typing import Any, Callable
import numpy as np
import pandas as pd
import plotly.graph_objects as go
f... |
57d9992ba92f3ad00ce6c19789287ac910105706316d90d1d691d2bed7d94c68 | Python | 53,170 | 813 | import concurrent.futures
import math
import random
import matplotlib.colors as mcolors
import seaborn as sns
import numpy as np
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib as mpl... |
fb65ef48f19e1b3e1d60d1a620ce0c0ca8df545300f59f43543b89a84341660a | Python | 53,185 | 1,456 | # encoding : utf-8
"""nelpy.hmmutils contains helper functions and wrappers for working
with hmmlearn.
"""
# TODO: add helper code to
# * choose number of parameters
# * decode (with orderings)
# see https://github.com/ckemere/hmmlearn
import copy
from warnings import warn
import numpy as np
from hmmlearn.hmm import... |
c5e97f39b8479144c8cf01dedf41e03d3e66be4544864d0e17046290ae51d413 | Python | 53,370 | 1,324 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
"""
Helper file to build Ultralytics Docs reference section.
This script recursively walks through the ultralytics directory and builds a MkDocs reference section of *.md files
composed of classes and functions, and also creates a navigation menu for ... |
5d5ca500ccb3fddd4bae3731e4bc5a6d7d8eac1860995e80bdc5c2d7be9ad9af | Python | 53,796 | 1,396 | # Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
"""
Transforms and data augmentation for both image + bbox.
"""
import logging
import numbers
import random
from collections.abc import Sequence
from typing import Iterable
import torch
import torchvision.transforms as T
import torchvision.tra... |
c6b69b0d90f2c8ec7ed4cd0912d165a7c8364a55ad79e7edaccb56e185895392 | Python | 53,858 | 1,374 | # This file is part of connectome-manipulator.
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Blue Brain Project/EPFL
import os
import re
import numpy as np
import pandas as pd
import pytest
from bluepysnap import Circuit
from mock import Mock, patch
from numpy.testing import assert_array_equal
from sci... |
cdcd630c8bbdab25ea2d67f4790618b3ece102562b11a3070daaaaff97a9f56f | Python | 53,874 | 1,372 | # coding: utf-8
import filecmp
import numbers
import re
import signal
import warnings
from copy import deepcopy
from pathlib import Path
import numpy as np
import pytest
from scipy import sparse
from sklearn.datasets import dump_svmlight_file, load_svmlight_file, make_blobs
from sklearn.model_selection import train_te... |
ea0c46fb501fa10defb23002b690af9510e582ccd56483265c72723414c27d53 | Python | 53,999 | 1,254 | import numpy as np
import os
from PySide6.QtWidgets import (
QFileDialog,
QAbstractItemView,
QVBoxLayout,
QHBoxLayout,
QGridLayout,
QMessageBox,
)
from PySide6.QtGui import QIcon
from PySide6.QtCore import QTimer, Qt, QEvent
from bannotator.state import GuiState
import bannotator.utility as utt
... |
ddbe2c07c6ee9330f54731c654bea4a0fd5d9bc7c918b48c62628e3e01e80917 | Python | 54,253 | 1,217 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
608982b65658bf3ca4751d304eae9301d1d5aba2c00de28c0f9ce1fd7369d631 | Python | 54,259 | 1,222 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
84287057846c14188b56c06b8e2341db3f62a83b3e62a4ef22555f43fa395c2b | Python | 54,310 | 1,744 | # The ImpedanceFitter is a package to fit impedance spectra to
# equivalent-circuit models using open-source software.
#
# Copyright (C) 2018, 2019 Leonard Thiele, leonard.thiele[AT]uni-rostock.de
# Copyright (C) 2018, 2019, 2020 Julius Zimmermann,
# julius.zimmermann[AT]un... |
b4247c933adbd34035798619895244a1f5d79af0ab2c0d22f705834f1343cc51 | Python | 54,350 | 1,224 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
60975991ec9992ae12c7b0541b4aac396aa70d524e8a706f99618413f8de2cc8 | Python | 54,351 | 1,224 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
c52be22450c4952867b1957cab11503afe7e699e22d4290a5d5c3d3b1d6b523d | Python | 54,469 | 1,223 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
5392763d3bd073aafc0e9096f4582db4497073bcfff0bb839c316697ac8989f3 | Python | 54,475 | 1,224 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
ede899a2d326b1e6f8a4ad9c1b86bc913d9495d83b6392f2b8bf8720c3d0c8a0 | Python | 54,478 | 1,319 | # Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
import logging
import warnings
import torch
import torch.distributed
import torch.nn.functional as F
import torchmetrics
from sam3.model import box_ops
from sam3.model.data_misc import interpolate
from sam3.train.loss.sigmoid_focal_loss impor... |
2b7b215714a028a5560fb7fc720ca4e742175ad2c4688d63d673f88e21f0995a | Python | 54,506 | 1,224 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
b597e26cb33141c141b318890c31e330f1ac178b908729e37c5f4e85de982580 | Python | 54,506 | 1,223 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
d4ec8d64fa2aefe1f9eebac94bd3c715169b84a8362b7d79434a70fb45e24e7e | Python | 54,663 | 1,280 | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from Functions import generate_grid_unit, generate_grid
class Miccai2020_LDR_laplacian_unit_add_lvl1(nn.Module):
def __init__(self, in_channel, n_classes, start_channel, is_train=True, imgshape=(160, 192, 144), range_flow=0.4)... |
dee79e166f98f75b5ede9b514dbea7b9e8494d820e45a7fdd40b9ff28ab5153b | Python | 54,666 | 1,621 | """Default settings for data processing and analysis. Do not edit this file,
but instead create a new configuration changing only the settings you need to
alter for your specific analysis.
"""
import importlib
import pathlib
import functools
import os
import pdb
import traceback
import sys
import copy
import logging
i... |
39bca7096eac7115284179ccbe2b98710fbc426227e3f3bbdef828e368624f54 | Python | 54,690 | 1,681 | import os
import json
import cv2
import numpy as np
from scipy.signal import find_peaks, peak_widths
from scipy import ndimage
from scipy.ndimage.filters import gaussian_filter, convolve1d
from .background_search_utils import *
from ...converted_fortran.converted_fortran import *
from ...utils import qf_defaults
try:... |
67b4a6d24d6e1e5f3ff6fb97cbd781d22da4eaf334fd4975d932b26d4e740473 | Python | 54,726 | 1,225 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
1be5398dcf4c28f43d5670fd6ab6dac6f686ae7da9c310fc46e8edd24ec7fd93 | Python | 54,740 | 1,225 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
fb0c7b6f8d1435aeba57ed18f94a7961de61f351e95f462c2bd9b716bd4cf3a4 | Python | 54,751 | 1,225 | from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper
from brainscore_vision.model_helpers.check_submission import check_models
import functools
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import sys
import os
import wget
from urllib.request i... |
c4f82edfa171e2fb3c6585173820030ed3d6c31c0f6ae57879a98b415f33b4a2 | Python | 54,880 | 1,604 | import logging
from pathlib import Path
from unittest.mock import patch
import h5py
import numpy as np
import pandas as pd
import pytest
import seisbench.data as sbd
import seisbench.util.region as region
def test_get_dimension_mapping():
# For legacy reasons test dimensions are called "ZNE".
# However, com... |
31b3bbf5c5e871ec63d852c3c318d909b927c51b47802f9fbacc3f4da42c06a3 | Python | 54,974 | 1,489 | """
Dendritic Warping Module for Stack Correction
This module provides functionality for transforming retinal ganglion cell dendrite
coordinates from curved 3D space to standardized conformal coordinates using
ChAT band surface fitting.
This is a loose re-implementation of the dendrite warping approach from:
https://... |
52399c8eee3d71cacfe0a7d4c7cd2a49139b5896b3178dba6d8366015ff767cf | Python | 55,084 | 1,140 | """Running the whole step and writing ``5_StatsAndML/``.
The equivalent of the block at the end of ``MEApipeline.m`` that calls
``doStats``, ``featureCorrelation``, ``doLDA`` and ``doClassification`` in turn.
Everything is written twice over: once as a CSV, because the tables are the
result and someone will want them... |
7f806cdebe21e253c4fad28707df900a40e61d68dd791caafa399881eaddec55 | Python | 55,093 | 1,347 | # -*- coding: utf-8 -*-
"""neurallnet-eval (2).ipynb
Automatically generated by Colab.
Original file is located at
https://colab.research.google.com/drive/1-yz55KUuEXIPe32D3t4_NHmpjlQ09Cco
# SNN Leukemia Classification - Results Generation (NO RETRAINING)
## Purpose
This notebook **loads a pre-trained SNN model... |
f077ab9f051638402a0725646bc03e2a63bbb8f5bd4b93b11cc884dd275f673e | Python | 55,097 | 1,416 | #!/usr/bin/env python3
"""
BehaveAI Settings Editor
This tool edits BehaveAI_settings.ini using the project dir direcotry passed to it
"""
import tkinter as tk
from tkinter import ttk, colorchooser, filedialog, messagebox
import tkinter.font as tkfont
import configparser
import os
import sys
import yaml
import subproc... |
f209557fa7bc542e9894aee92fe9e324450c38c786825b1afd66f21cf54a97c3 | Python | 55,241 | 1,214 | """CAT-NAP panel: suite2p folder scanner, denoising settings, trace preview."""
from __future__ import annotations
from pathlib import Path
from typing import Callable
import numpy as np
from PyQt6.QtCore import Qt, QThread, pyqtSignal
from PyQt6.QtWidgets import (
QCheckBox, QComboBox, QDoubleSpinBox, QFormLayo... |
e930b47ff99c9362f9adf765df2e513fa2e298c47252e5f47ed66cb692ab0ba6 | Python | 55,282 | 1,444 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import textwrap
from collections.abc import Iterator, Mapping
from enum import Enum
from typing import Any
from django.conf import settings as django_settings
from django.db import models as django_models
from django.db import transaction
from drf_s... |
776582a6ba1483b453e48979393e4bf0ba7d0102dd1c19698deedbbe10517561 | Python | 55,352 | 1,342 | from __future__ import annotations
import re
import typing
from collections.abc import Callable
from collections.abc import Sequence
from itertools import pairwise
from PySide6 import QtCore
from PySide6 import QtGui
from PySide6 import QtWidgets
from .. import _locale
from .._config import _schema as schema
from ..... |
5eea27e0fe17809049d7e1c865b0532c235c0272f28023ad80e1c10ac6e14d1e | Python | 55,615 | 1,348 | import functools
import logging
import time
import warnings
import weakref
from collections import OrderedDict, defaultdict
from collections.abc import Callable, Generator, Iterable, Iterator, Mapping
from typing import (
Any,
)
from torch.utils.data import DataLoader
from eir.train_utils.ignite_port.base import ... |
20d4d855ebfdbc2215c79d4423a5b0af1fa5fc1a9d305c4a7a0a1b229f07fd5a | Python | 55,621 | 1,591 | # -*- coding: utf-8 -*-
import collections
import math
import os
import random
import tempfile
import warnings
from dataclasses import asdict
from pathlib import Path
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
from loguru import logger
from seqeval.metrics import (
classification_re... |
35bde03af03408d0014ab8584ad1b4cf1c7644e544c6761a82cfe3407ba5188c | Python | 55,806 | 919 | import inspect
import multiprocessing
import os
import traceback
from copy import deepcopy
from time import sleep
from typing import Tuple, Union, List, Optional
import numpy as np
import torch
from acvl_utils.cropping_and_padding.padding import pad_nd_image
from batchgenerators.dataloading.multi_threaded_augmenter im... |
68fdbcda680c078eb97417ef4443f3d4c82fd3789fea01bc99c83624230e6a5f | Python | 55,879 | 1,179 | # -*- coding: utf-8 -*-
import re
import os
import pandas as pd
import shutil
import sys
import time
import matplotlib.pyplot as plt
import numpy as np
import pprint
import struct
def natural_sort_key(s):
"""Sort strings containing numbers in natural order (e.g., sample1, sample2, ..., sample10)"""
return [int... |
e518cc00a70b45d66d66286f06d607ebb5e697c4b4a2085169336157dea17229 | Python | 56,128 | 1,459 | # -*- coding: utf-8 -*-# -*- coding: utf-8 -*-
import glob
import json
import logging
import os
import os.path as op
import tempfile
import warnings
from time import time
import dipy.tracking.streamlinespeed as dps
import nibabel as nib
import numpy as np
import pandas as pd
import pydra
from bids.layout import BIDSLa... |
df77229ae9f76939ebbc5d03ee8d8ab74799855e0439eff3f62ac94aaefab400 | Python | 56,171 | 1,290 | import sys
import time
from os.path import isfile
from graph_tool import load_graph
import gzip
from os import remove
import pandas as pd
import numpy as np
from scipy import ndimage
import os
from pathlib import Path
import pathos.pools as pp
from functools import partial
from pycurv import (
pexceptions, normals... |
0cb7b876b15c5ee40e384af5d52a62cb2e2209f42a9e73e818bed3749056898e | Python | 56,312 | 1,655 | # Copyright (C) 2019-2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
from __future__ import annotations
import io
import itertools
import os
import shutil
import tempfile
import zipfile
from abc import ABC, abstractmethod
from bisect import bisect
from collections.abc impor... |
eecf87920f58773c792bd3d7f757161f0cfec4b0d72cf0d0f5d30394a35afacf | Python | 56,375 | 1,120 | """
Adopted from AllenNLP:
https://github.com/allenai/allennlp/blob/v0.6.1/allennlp/nn/util.py
Assorted utilities for working with neural networks in AllenNLP.
"""
# pylint: disable=too-many-lines
from collections import defaultdict
from typing import Dict, List, Optional, Any, Tuple
import math
import warnings
i... |
478c3b993d821adb8bef8b4b9f55623261b16fd62d1d43b2afa649af3d0ad837 | Python | 56,435 | 1,075 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 2 16:59:08 2025
@author: loesch
"""
import numpy as np
import pandas as pd
import glob
from os.path import splitext, join
import os
import itertools
from sklearn.model_selection import KFold, StratifiedKFold
from scipy.ndimage import gaussian_fil... |
659ee719cd1337de2aff61867d69522dd1a744ae57449a70406f37338b306ff3 | Python | 56,437 | 1,780 | import os
import time
import argparse
import traceback
import numpy as np
import heig.input.dataset as ds
from heig.utils import GetLogger, sec_to_str
VERSION = "1.6.0-alpha"
MASTHEAD = (
"******************************************************************************\n"
)
MASTHEAD += "* Highly Efficient Imaging ... |
5d65c8c9b7d069f2a7365e45c08d4d7333f3cc4f63bfb4db3d579ef452f62725 | Python | 56,546 | 1,218 | # Working / Latest but Rougher PhaseDecoder w/ LSTM Conv
# class PhaseDecoder(nn.Module):
# def __init__(self, gpu_id, ch_mult):
# super(PhaseDecoder, self).__init__()
# self.gpu_id = gpu_id
# self.ch_mult = ch_mult # channel multiplier
# self.blk1 = LSTMConvCell(self.gpu_... |
7c7e1b0616bb78ad427629620527b1838e06d16899c3b8c9419c116d4f92085a | Python | 56,553 | 1,173 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
"""Monte Carlo fuzzing of the `yolo` CLI to find bugs outside the finite test matrix.
Runs randomized/mutated `yolo` commands in subprocesses, classifies every outcome (pass, expected cfg error,
environment skip, network flake, hang, crash, bug candid... |
8d3fcbd8a3e548427e7eea930470ba6b3f71058d17298769f812d7d44a8766c5 | Python | 56,710 | 1,249 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import functools
import gc
import math
import os
import random
import time
from contextlib import contextmanager
from copy import deepcopy
from datetime import datetime
from pathlib import Path
from typing import An... |
6f9a66e5e8e7b682a87ec95144d739dc3fc136e7799fe965505ca15c10c0b49b | Python | 56,756 | 1,444 | """
Stacking With Auxilary Feature trainer: a trainer for ensembling
Author: Xinyu Wang
Contact: wangxy1@shanghaitech.edu.cn
"""
from .distillation_trainer import *
from transformers import (
AdamW,
get_linear_schedule_with_warmup,
)
from flair.models.biaffine_attention import BiaffineAttention, BiaffineFunction
fro... |
27b50fcdcf6b4d3f6c0b09eb4ed293eb1743f9cab952768809da1de5581b6280 | Python | 56,868 | 1,435 | import os
import sys
import numpy as np
import pyqtgraph as pg
from PyQt5 import QtGui, QtCore, QtWidgets
from PyQt5.QtWidgets import qApp, QMainWindow
# lasagna modules
# The following imports are made here in order to ensure Lasagna builds as a standlone
# application on the Mac with py2app
# import tifffile # Us... |
700b1aa97c5c5f5f10de44494e3ee8d46c11d1ef7ec9b04f82ead000c1c6861a | Python | 57,007 | 986 | import datajoint as dj
import numpy as np
from scipy import ndimage
import math
from tqdm import tqdm
import torch
from functools import partial
from staticnet_analyses import base
from staticnet_experiments import configs, models as static_models
from neuro_data.static_images import data_schemas, stats
from staticnet_... |
d868eb957a807780a51ff2a92fe24cd2ca308c01c7032779925158a2baab5788 | Python | 57,109 | 1,881 | """test_splotch.py."""
import os
import re
from io import BytesIO
from typing import Literal
import jax.numpy as jnp
import matplotlib as mpl
import numpy as np
import numpy.typing as npt
import pandas as pd
import pytest
import scipy.stats
from jax import Array, random
from matplotlib.figure import Figure
from splo... |
74019204ada1c6cfeb4c099ff844be9afff0ca9253dc30151fa930f02842fb73 | Python | 57,308 | 1,536 | """Source reconstruction."""
from __future__ import annotations
import os
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
from scipy.spatial import KDTree
import mne
from mne.beamformer._compute_beamformer import (
Beamformer,
_reduce_leadfield_rank,
)
from mne.beamformer._lcmv impo... |
c0738fb8633f5127a9d44f2eaa7a26757a8902479ea0ed80b69cebe5ba4eab7e | Python | 57,327 | 1,806 | import os
import time
import argparse
import traceback
import numpy as np
import heig.input.dataset as ds
from heig.utils import GetLogger, sec_to_str
VERSION = "1.6.0-alpha"
MASTHEAD = (
"******************************************************************************\n"
)
MASTHEAD += "* Highly Efficient Imaging ... |
fa0a387d59b624a975dbda01cd9786de22b1ab02ec236c120332ab241137fef6 | Python | 57,491 | 1,131 | # This file is part of connectome-manipulator.
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Blue Brain Project/EPFL
"""Connectome (re)wiring module (general-purpose)."""
import libsonata
import neurom as nm
import numpy as np
import pandas as pd
from connectome_manipulator import log, profiler
from c... |
12e7a791f60b2646d6f2c2eb3407b51477bbf619ea84cc9e0062330d26bf74c0 | Python | 57,757 | 1,457 | import warnings
import logging
from pathlib import Path
import torch.nn
from torch.nn.parameter import Parameter
import torch.nn.functional as F
import torch.autograd as autograd
import flair.nn
import torch
from flair.data import Dictionary, Sentence, Token, Label
from flair.datasets import DataLoader
from flair.emb... |
02ead4fd2475089e31d95ed90738e1d0a732a26c1f935fab636bc28167c49362 | Python | 58,111 | 1,788 | import csv
from collections.abc import Callable, Generator, Sequence
from copy import copy
from dataclasses import dataclass
from functools import partial, wraps
from pathlib import Path
from statistics import mean
from typing import (
TYPE_CHECKING,
Any,
Literal,
Optional,
Protocol,
Union,
... |
6e5f67729db78dc562bbed7edb8ba1b05b841d99f00fa4dab38d2d7ab4b29598 | Python | 58,112 | 1,272 | import math
import os
import argparse
from pathlib import Path
from multiprocessing import cpu_count
import random
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from scipy.stats import spearmanr
import torch
import torch.nn as nn
from torch.nn import ... |
a0ecf954406fa1641dac7ada9c9af6f49c718b13a05ee6294d30dbda69a8951c | Python | 58,168 | 1,080 | import pandas as pd
from napari import Viewer
import time
from qtpy.QtCore import Signal
from superqt import QCollapsible
from qtpy.QtWidgets import QPushButton, QWidget, QVBoxLayout, QMessageBox
from magicgui import magicgui
from magicgui.widgets import FunctionGui
from napari.qt.threading import thread_worker... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.