sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
3b936adc0268f74cb8bbdb1cce6ab6ef4fb525b1d5ef4dc12dbcd3cebc928f59
Python
92,803
1,717
# Kai Sandbrink # 2023-06-23 # This script analyzes the task 1 behavior for a compiled DF or responses # %% LIBRARY IMPORT import numpy as np import pandas as pd import scipy.fft import os, pickle import seaborn as sns import matplotlib.pyplot as plt import matplotlib as mpl from human_utils_project import sort_tra...
ee9f667c75c490b5fd2d4cc4f75716b63253c0c122742f23c4b0de3c54d12d54
Python
93,004
2,627
"""idea is to have abscissa and ordinate, and to use aliasing to have n_series, _series_subset, series_ids, (or trial_ids), and so on. What is the genericized class? EventArray? eventseries, eventcollection when event <==> spike, abscissa <==> data, eventseries <==> eventarray eventseries_id <==> series_id, even...
063b064a9280d408907f9ce4c26538cf87b3ea9d9b2ca09bec6af2e0a0afc3f3
Python
93,634
2,143
""" Schemas for resonant scanners.""" import datajoint as dj from datajoint.jobs import key_hash import matplotlib.pyplot as plt import numpy as np import scanreader from scipy import ndimage from tqdm import tqdm from . import experiment, injection, notify, shared from .utils import galvo_corrections, signal, quality...
7fd09a856ad747b9cbf5bafce0dde317c463e07f2f76a2989bf529c7ba2f1df5
Python
93,761
2,331
""" Copyright 1999 Illinois Institute of Technology 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, publis...
963b1d491283dbd5e0f4fb9c7393b7c8f89f2d0e24604e08ab3ceaac7e4b5992
Python
95,102
2,674
# note: # veva can be binned, and binning can be accommodative, or accumulative # accomodative is averaging/interp while accumulative is mass-preserving # __all__ = ['EventArray', # 'BinnedEventArray', # 'SpikeTrainArray', # 'BinnedSpikeTrainArray'] # __all__ = ['BaseValueEventArray(...
1f1fb190e371370c0c367f31770ff50ebf19e185fc04301ecd69bbbaf5fd9c8c
Python
95,720
2,175
# Code (c) by Paula T. Kuokkanen, Z. Mehnoush Faghani # # Code is licensed under a # Creative Commons Attribution 4.0 International License. # # You should have received a copy of the license along with this # work. If not, see <https://creativecommons.org/licenses/by/4.0/>. # # Code for figures 6-9 in the manuscript...
b442ab9402ec8e189c53a64359975d265187c50a72fc4276af98bbb99d606c74
Python
95,814
2,017
import elikopy.utilsSynb0Disco as util import nibabel as nib import numpy as np from random import shuffle import math import glob import sys import datetime import time import os import json import shutil import matplotlib.pyplot from future.utils import iteritems import subprocess from dipy.data import get_sphere f...
cddd8119af28b32aae773b6eee6f2bb492cfd0b4d66f1ae3234ef47dbe39b42a
Python
96,021
2,176
"""Contains the tests for the model abstractions of ViRelAy.""" import glob import os import h5py import numpy import pytest from virelay.model import ( Analysis, AnalysisCategory, AnalysisDatabase, Attribution, AttributionDatabase, DownSamplingMethod, Hdf5Dataset, ImageDirectoryDatas...
eacc5818804af49b377b1b2f44bab764a7e2511c17ebed6e8ab0297b8a457ea2
Python
96,046
2,015
""" Iterative mesh refinement for surface morphometrics pipeline. This script implements density-guided mesh refinement that moves surface vertices toward the true membrane center by: 1. Sampling density profiles along normal vectors 2. Fitting dual Gaussians to identify membrane leaflet peaks 3. Computing displacemen...
b3bb669b44adec4317ef502f17cd04a716fb237937e3fac8022b34c0e66a3bda
Python
96,816
1,991
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license """ Export a YOLO PyTorch model to other formats. TensorFlow exports authored by https://github.com/zldrobit. Format | `format=argument` | Model --- | --- | --- PyTorch ...
ee134e22bf8ff742192ddb44316e0ed6ab122635773cfe526ce3dff16ef28b4f
Python
97,554
2,926
#!/usr/bin/python2 # Handle unicode encoding import csv import errno import getpass import itertools import locale import os import platform import threading import time import shlex import socket import sys import tempfile import urllib2 from optparse import OptionParser, OptionGroup, SUPPRESS_HELP from re import c...
cb6f42012f7ecf55658f92cd42f96799eecdb40eeb4cc1340700594156e005ef
Python
97,696
2,457
# -*- coding: utf-8 -*- # @Author : LG import functools import math import os import cv2 # 调整图像饱和度 import imgviz import numpy as np import orjson import requests import torch from PIL import Image from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import QThread, pyqtSignal from skimage.draw.draw import p...
ffb4c9df6e8afa23f14fb204a074a1b0239c7f40a93fd82bfb47014c4d77a590
Python
97,758
2,083
"""PyTorch ResNet This started as a copy of https://github.com/pytorch/vision 'resnet.py' (BSD-3-Clause) with additional dropout and dynamic global avg/max pool. ResNeXt, SE-ResNeXt, SENet, and MXNet Gluon stem/downsample variants, tiered stems added by Ross Wightman Copyright 2019, Ross Wightman """ import math fro...
c83ac0285679b4438a2125731281fd1385dfc240d369cd5e15a3764845584854
Python
98,230
2,485
""" Copyright 1999 Illinois Institute of Technology 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, publis...
5c68e4edb44afc926744c86d545a40286739c0716fb28d9b0094109a77c740e4
Python
98,640
2,720
import warnings import logging from pathlib import Path import sys sys.path.append('...') 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.datase...
69327582c32861336da72d2f7c06dd602070d0d0f93d2d2979783fe9498988b4
Python
99,192
2,410
# Copyright 2022 Andrew Lehr ### License: Apache-2.0 (http://www.apache.org/licenses/LICENSE-2.0) import os import datetime import warnings import numpy as np import seaborn from sklearn.linear_model import Ridge from sklearn.decomposition import PCA import matplotlib.pyplot as plt from collections import defaultdict ...
d9589f9ee0dbc18e6355cd0334d896527bc30deebf76c71d62856ab5cb370dd9
Python
99,445
1,590
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.12.3) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x07\x21\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x...
10925b07ea0530f03707900ada508f3d4a6063984b4e4c8d713fb5ef8e49e1b9
Python
99,776
2,060
""" This file regroups several custom keras layers used in the generation model: - RandomSpatialDeformation, - RandomCrop, - RandomFlip, - SampleConditionalGMM, - SampleResolution, - GaussianBlur, - DynamicGaussianBlur, - MimicAcquisition, - BiasFieldCorruption, - IntensityAugmen...
8024aa752259f202cfcbe21f1bd934a93d45bf6f81e06e12cc033d1f681b1125
Python
100,181
2,290
import os import re import sys import csv import glob import shutil import pickle import inspect import textwrap import itertools import subprocess import numpy as np import pandas as pd import seaborn as sns import networkx as nx from scipy import stats from typing import Literal from jinja2 import Template from tqdm....
c8f36517d06324b868536158c5e767ab6c13048dfc08cec25edff01c442d3ee6
Python
100,967
2,365
# This file is part of connectome-manipulator. # # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL """Definition and mapping of model types to classes""" from abc import ABCMeta, abstractmethod import os import sys import json import numpy as np import pandas as pd import scipy.spars...
4e0c813a1b5fe07f2df420c117309c6b669f8fe4fd3810e6941724ca2ed62203
Python
101,271
2,082
import torch import torch.nn as nn import numpy as np from torch.nn import MSELoss, BCELoss, CrossEntropyLoss from torch.optim import Adam, SGD from copy import deepcopy from collections import defaultdict from functools import partial from typing import Optional, Dict, Any, Union, Tuple, List import EIANN.utils as ...
3b9bded416fb2d26b84d983aa47426596c4a3a171e6fcffef990adc21ae525ff
Python
101,610
3,020
__all__ = [ "TuningCurve1D", "TuningCurve2D", "TuningCurveND", "DirectionalTuningCurve1D", ] import copy import numbers import warnings import numpy as np from scipy.ndimage import gaussian_filter from .. import utils from ..utils_.decorators import keyword_deprecation # TODO: TuningCurve2D # 1. ini...
4f54fd2fd743d364e25124597dbfd74746e1edf62ab7bf85f27251c5334a4880
Python
101,679
2,380
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license from __future__ import annotations import contextlib import importlib import pickle import re import threading from copy import deepcopy from pathlib import Path import numpy as np import torch from torch import nn from ultralytics.nn.autobackend i...
0c41086e6462cb6c175076399bdca9778b510e20b9cc24393c216dbb265eec37
Python
102,058
2,644
# /------------------------------------------------------------------------------+ # | 06-JUL-2022 | # | Copyright (c) Bone Imaging Laboratory | # | All rights reserved ...
8ec8edf519ee3b71095211c28b95be8e9bd9dac4d680e1ea0312ab0df0462d38
Python
102,406
1,608
""" (C) Copyright 2019 IBM Corp. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
ed87cde3acb5f09c594001626334313b878b181f1f8f3ac13852f4137c2d8c0b
Python
104,008
2,459
import os import math import shutil import time import random import functools import traceback import sys import csv import tensorflow as tf import numpy as np from tensorflow import keras import pandas as pd import utils.normalization as normalization import matplotlib.pyplot as plt from scipy.spatial import Convex...
654f4d300fff932fe6c4641baceb669cecf89b10c5b2b2b4dfd21d389a825e37
Python
104,222
2,553
""" nems_lbhb.analysis.dstrf - tools for generating/analyzing dstrfs dstrf_pca - subspace_model_fit - """ import logging import copy import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA, FactorAnalysis from scipy.ndimage import zoom, gaussian_filter from nems.tools import dstrf a...
9fe2a8e14861327ed9127d50dc52809292a15c147bb601bf536d4307e2ad17d4
Python
104,781
2,564
""" nems_lbhb.analysis.dstrf - tools for generating/analyzing dstrfs dstrf_pca - subspace_model_fit - """ import logging import copy import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA, FactorAnalysis from scipy.ndimage import zoom, gaussian_filter from nems.tools import dstrf a...
80c20412f25cd692553361157c58696f68fb29c88200d5c91fb40dbbeb38c086
Python
105,923
2,174
# Resource object code (Python 3) # Created by: object code # Created by: The Resource Compiler for Qt version 6.4.2 # WARNING! All changes made in this file will be lost! from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x18\x83\ \x00\ \x00\xa2\xbex\xda\xed]\x09XTYv.\xda\x9e\xe9\ \xa4\xa7\xd3\xf6d&==\xf9&1I...
7ebc1f4365948734708f5852a85eb1a384dcb174e748d9437888d1cf400ac2ef
Python
106,395
3,512
# imagecodecs/numcodecs.py # Copyright (c) 2021-2026, Christoph Gohlke # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice...
82a391acf15c6f03aa9a886242f2733ed11b9fb1738eb23c56c6cac39837e5db
Python
106,415
2,770
"""Generator module for dannce training. """ import os import numpy as np from tensorflow import keras from dannce.engine import processing as processing from dannce.engine import ops as ops from dannce.engine.video import LoadVideoFrame import imageio import warnings import time import scipy.ndimage.interpolation impo...
2ea665e371d87108303379e99a90d15a1c8893407c3acbf68cc2a6bfb4002bdf
Python
106,595
2,738
""" Schemas for mesoscope scans.""" import datajoint as dj from datajoint.jobs import key_hash import matplotlib.pyplot as plt import numpy as np import pandas as pd import scanreader from scipy import ndimage from tqdm import tqdm from . import experiment, injection, notify, shared from .utils import galvo_correction...
dd80af7a6a75bb6c8e09527020b22f265d6798f4ee10694f8a0a37c8c0308bfb
Python
107,207
2,008
#!/bin/python3 # Arbor simulation of memory consolidation in recurrent spiking neural networks, consisting of multi-compartment neurons (with soma, apical dendrite, # and basal dendrite). The neurons are connected via current-based, plastic synapses (early-phase plasticity is based on calcium dynamics, and late # phas...
2e2d7cbdb905d3b84689da8b24dd03c9fb1f1dd28c2d47fc6888b04791609ffa
Python
108,593
3,084
"""Main chat interface page for ChemGraph.""" import asyncio import hashlib import logging import os import pprint import queue import threading import uuid from datetime import datetime from pathlib import Path from typing import Any, Dict, Optional import pandas as pd import streamlit as st from ase.io import read ...
165b025017f94b5247c6a35ef0f541955737b0f4e116148f35760fb6e6f121c5
Python
108,691
2,508
#!/usr/bin/env python3 """ Hyperparameter Optimization CLI Tool A command-line tool for hyperparameter optimization of ML models using Optuna and MLflow. Supports RandomForest, XGBoost, LightGBM, and EBM classifiers with multiple optimization metrics. Features: - Multi-metric optimization with Optuna pruning for effi...
9cdc6fd65505a5f6aa5ce5a5214f0cd0059c02c65704d32dc24ca5e84941809a
Python
108,781
2,885
# Copyright (C) 2019-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT from __future__ import annotations import os.path as osp import re import sys from collections import defaultdict from collections.abc import Callable, Collection, Generator, Iterable, Iterator, Mapping, S...
4523b4f7469d40c416920f0074480c766284df5365e60dbdb5b39d97d79c4482
Python
108,896
3,129
# -*- coding: utf-8 -*- """ RegularlySampledAnalogSignalArray ----------------- Core object definition and implementation for RegularlySampledAnalogSignalArray. """ __all__ = [ "RegularlySampledAnalogSignalArray", "AnalogSignalArray", "PositionArray", # Trajectory? "IMUSensorArray", "MinimalExamp...
2b28ed8d109e3ca83580314e74f08fe746810647c29f0ed92ac2d6132128673c
Python
109,535
2,522
# coding: utf-8 import inspect import itertools import math import re import sys import textwrap import warnings from functools import partial from pathlib import Path import joblib import numpy as np import pytest import scipy.sparse from scipy.stats import spearmanr from sklearn.base import clone from sklearn.calibr...
26c65325698e8d9486a2a5013ad17447bfe1588a77fa6a0e6cebcdec316d6c77
Python
109,754
2,370
import anndata try: from anndata.base import Raw except ImportError: from anndata import Raw import batchglm.api as glm import dask import logging import numpy as np import pandas as pd import patsy import scipy.sparse from typing import Union, List, Dict, Callable, Tuple from diffxpy import pkg_constants from...
c88e806e656c078b73df5c0d4fddcd2f5be85aed63402745a9630690d2630ca4
Python
110,271
2,859
from __future__ import annotations import copy import inspect import os import warnings from abc import ABC, abstractmethod from collections import defaultdict from collections.abc import Iterable from pathlib import Path from typing import Any, Literal, Optional, TypedDict from urllib.parse import urljoin import h5p...
3671c9ea778f3ff83e95bed40bb67c6111e34586472f9e04f0148fc84a0e0b8c
Python
110,587
2,741
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import gzip import io import json import math import os import os.path as osp import zipfile from collections import Counter from collections.abc import Iterable, Sequence from copy import deepcopy from functools import partial from http import HTTPS...
5e1f36acccf5bfe350dbd91e903bb4edc3f62f9ef824d2194542820564dae7d5
Python
110,897
2,488
import numpy as np import h5py def get_bmu(sample, som): loc = np.argmin(((som.K - sample) ** 2).sum(axis=2)) bmu = np.divide(loc, som.kshape[1]), loc % som.kshape[1] return bmu def distance_map(K): """ Returns the average distance map of the weights. (Each mean is normalized in order to sum u...
bc95127632cbc9efc9ad467c5f172eeabdae88cba4d023d097f3d46c06368930
Python
110,978
1,728
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.5.1) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x06\x08\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x30\x0...
6c569a4349a90ecb7bb00fdbef3d1c884f0e67b7d45cc3e0b4548b7c6364f296
Python
110,982
2,848
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.embe...
0f7f09032f8878128502233d26920e187ad9e36b5e6ba6444496206dbaea663e
Python
111,117
2,440
# Kai Sandbrink # 2023-06-23 # This script analyzes the task 1 behavior for a compiled DF or responses # %% LIBRARY IMPORT import numpy as np import pandas as pd import scipy.fft import os import pickle from sklearn.linear_model import Ridge, Lasso import seaborn as sns import matplotlib.pyplot as plt import matplot...
206374c4260e841715512b9d0f727c3f289f9599d0e19c764498d21119640d53
Python
111,584
2,033
import pandas as pd import os import glob import seaborn as sns import matplotlib.pyplot as plt from matplotlib.colors import to_rgb import numpy as np import pingouin as pg from statannot import add_stat_annotation from tqdm import tqdm import argparse from math import comb #from sklearn.utils import check...
24a4de727b143ddb695098f8cd39583317b8b93cf52e7e62cc049f4a4f88494d
Python
111,668
2,389
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license import contextlib import csv import os import platform import shutil import tarfile import urllib import zipfile from copy import copy from pathlib import Path import cv2 import numpy as np import pytest import torch from PIL import Image import ult...
7fc7d9f550351bc78db610f1d57c7c98a0c3349a287a9682efd13f5bfb3a0f2f
Python
111,685
2,500
""" Fine-tune trainer: a trainer for finetuning BERT and able to be parallelized based on flair 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 BiaffineAtte...
92479110ef2e3ed1d72e1b934046cfbd65591050ac369520c5a0da8a31522525
Python
112,062
2,464
# coding: utf-8 """Distributed training with LightGBM and dask.distributed. This module enables you to perform distributed training with LightGBM on dask.Array and dask.DataFrame collections. It is based on dask-lightgbm, which was based on dask-xgboost. """ import operator import socket from collections import defa...
bfc62dd84449fb44a2f01b07a2f46f427167f51a8e99468c393f2c41448bdd67
Python
112,362
2,202
#Lucas Sancéré - # import copy # import glob import json import math import multiprocessing as mp import warnings # import os # from ast import literal_eval from itertools import product import cv2 import numpy as np import PIL import scipy import shapely.geometry from PIL import Image from skimage.measure import re...
da515dc5f6b2bcbdc238075aa3bbe07806672638a8d2448bb1534e45862940db
Python
112,438
2,614
"""The viewer's single HTML page. Kept as one self-contained string — no build step, no external assets, no CDN. A bundle gets shared with people who will run one command and expect a page; anything that needs npm or a network fetch fails that test. Three tabs, because a run holds three different kinds of question: ...
7725291e21e8fa6f4738a7f7a1be692b34d3dac3d92549308b72afb3b436aa52
Python
112,743
2,704
""" Copyright 1999 Illinois Institute of Technology 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, publis...
c6e55286a28d48d48cf10c0cee45dc2ae7df0ca53c3b106a14816a3e1614a2dd
Python
113,092
2,535
""" Figures - Figures within the EMPRISE project (Revision) Joram Soch, MPI Leipzig <soch@cbs.mpg.de> 2023-05-28, 15:45: inherited from "Figures_V1.py" 2024-05-28, 16:16: WP1_Fig1 2024-06-04, 15:47: WP1_Fig2 2024-06-19, 14:59: WP1_Fig3 2024-06-19, 15:27: WP1_Fig4 2024-06-25, 19:57: WP1_Fig2 2024-06-27, 13:18: WP1_Fig2...
e130c46fd96ce4ba745fbbbc8bf9ff4013183bfab6b6dd40877c3fd1a2c38b65
Python
113,567
2,649
# Copyright (C) 2021-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import copy import itertools import json import multiprocessing import os import os.path as osp import random import xml.etree.ElementTree as ET import zipfile from collections.abc import Callable from cont...
cc53854623a616e5084fc74aa8f6f8506eaa56036108b2dfaf3963cb23cb4ed7
Python
114,127
2,943
from __future__ import annotations import asyncio import json import math import os import re import tempfile import warnings from abc import ABC, abstractmethod from collections import defaultdict from itertools import groupby from pathlib import Path from queue import PriorityQueue from typing import Any, AsyncGener...
f8095189b9a9ffad385279b1fd5ced851678e48d196bd58797e052ca7d46eef0
Python
116,463
2,943
from PySide6.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout, QSpacerItem, QHBoxLayout, QPushButton, QFileDialog, QMessageBox, QTreeView, QHeaderView, QLabel, QFrame, QTableView, QStackedWidget, QComboBox, QInputDialog, QGridLayout, QSizeP...
f86f1a23a8d14ef3a62dc31bc9befbe46522a28e8ae6f27e7b527b91ae34b6c4
Python
116,620
3,017
""" Copyright 1999 Illinois Institute of Technology 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, publis...
c6655be716b5d21fe4b7cf30d76089528d15e3eadf263cf7e3945bf0342689b2
Python
119,213
2,236
import os from argparse import ArgumentParser from math import sqrt import dgl import dgl.function as fn import numpy as np import pandas as pd import pytorch_lightning as pl import torch import torch.nn as nn import torchmetrics as tm import wandb from dgl.nn.pytorch import GraphConv from torch.nn import functional a...
d7c57493c1cf9e6e37daa8f18117a8faf61d4845becc03295e95c2308e560b92
Python
120,030
2,820
""" Copyright 1999 Illinois Institute of Technology 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, publis...
8442137c69c41a4b5e9f2a5165bd3af83b822f4b8af67cdc3f216615e5565427
Python
120,138
2,754
#!/usr/bin/env python3 """ Enhanced NTCP Analysis with Traditional and Machine Learning Models ================================================================== This comprehensive script combines: 1. Traditional NTCP models (LKB Log-Logistic, LKB Probit, RS Poisson) 2. Machine learning models (ANN, XGBoost) wi...
532c8df1c6580e7505a9a8268ce751e72a2e43534d9f0228cd4b1d0371d0ea33
Python
120,302
2,985
""" Hypnogram-related functions and class. """ import datetime import logging import warnings import mne import numpy as np import pandas as pd from pandas.api.types import CategoricalDtype from .evaluation import EpochByEpochAgreement from .io import set_log_level from .plotting import _plot_hypnogram from .sleepst...
309cc80237613e394e9627b0d5e0555b7c0045a9994684be1dbb30ab4b41d251
Python
122,176
3,328
"""RHINO functions.""" from __future__ import annotations import os import copy import shutil import warnings from pathlib import Path import numpy as np import pandas as pd import nibabel as nib import nilearn as nil import matplotlib.pyplot as plt from sklearn.mixture import GaussianMixture from skimage import mea...
5a3f3ff82de61c82b11ce04a1ec059d946a48cd8f09dcb3580744ff7a38e33da
Python
122,430
2,908
import os, sys, time, re, gzip import numpy as np import scipy as sp import matplotlib.pyplot as plt from matplotlib import gridspec import numpy.random as npr # Uncomment this if you need tensorflow #import tensorflow as tf import pandas as pd from scipy.optimize import least_squares from sklearn.metrics import confus...
b869e12be327f6d0f22b3794e592c9e3e7c103f912ae42df79beb0f303fe495e
Python
122,501
3,254
import os import re import copy from typing import Dict, List, Optional, Union from urllib.parse import urlparse import scipy.io from typing_extensions import Literal from .config import get_bustools_binary_path, get_kallisto_binary_path from .constants import ( ABUNDANCE_FILENAME, ABUNDANCE_GENE_FILENAME, ...
35c3491b9df857bd37168857d032fc228dca16d5c3e21c6802204439d3c03690
Python
124,443
2,855
""" EMPRISE - EMergence of PRecISE numerosity representations in the human brain Joram Soch, MPI Leipzig <soch@cbs.mpg.de> 2023-06-26, 15:31: get_onsets 2023-06-26, 16:39: get_confounds 2023-06-26, 18:03: get_mask_nii, get_bold_nii, get_events_tsv, get_confounds_tsv 2023-06-29, 11:21: load_mask, load_data 2023-06-29, ...
609a3ef4a33a3e229e53ac922b3a6ed909edaaa8ca78a7beaafd9c323c8c0be5
Python
124,859
3,359
import io import os import logging import json import re import math import copy import tempfile import warnings import pandas as pd import numpy as np import h5py from scipy.sparse import csr_array from .epoch import (remove_overlap, merge_epoch, epoch_contained, epoch_intersection, epoch_names_m...
c1cb20650a2ff6890a9302c3289d025dfe3d098b048377ef05dc037494004eec
Python
129,252
3,111
import numpy as np import numexpr as ne import scipy.signal import logging from nems.registry import layer from nems.distributions import Normal from .base import Layer, Phi, Parameter from .tools import require_shape, pop_shape log = logging.getLogger(__name__) class StateGain(Layer): state_arg = 'state' ...
0841b0e4005c21a3d4ee783045962a048d0533318722f61dc0219432648408c4
Python
131,587
3,165
#!/usr/bin/env python import json import os import argparse import ntpath import re import sys from PyQt5 import QtGui from PyQt5 import QtWidgets from PyQt5 import QtCore import glob from functools import partial import subprocess import shutil import tqdm import inspect try: import mrcfile except ImportError: ...
db9e52f874d666552adf064841ae5184e3aabf37d53f084332e723b1e623d4f6
Python
132,643
2,985
# This file is part of connectome-manipulator. # # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL """Module for building stochastic connection probability models of various model orders""" from functools import partial import itertools import os.path import matplotlib.pyplot as plt ...
74940c5a6a87e681d2142f7ddacf22d7c737c58387b200babdbf5d31cef40360
Python
132,806
2,592
""" LIST OF FUNCTIONS LoadAndCrop cropframe Reference Locate TrackLocation LocationThresh_View ROI_plot ROI_Location Batch_LoadFiles Batch_Process PlayVideo PlayVideo_ext showtrace Heatmap DistanceTool ScaleDistance """ ######################################################################################## im...
1fafb82042dacb107317d656544527cabeb566c5e7f1fb4d3023fa14dea8d584
Python
133,344
2,809
# -*- coding: utf-8 -*- """ Created on Sun Apr 7 20:03:31 2024 @author: aka2333 """ # In[] import numpy as np from scipy import ndimage import pandas as pd # basic plot functions import matplotlib as mpl import matplotlib.pyplot as plt import re, seaborn as sns # turn off warning messages import ...
1a7fc3fef7886c897935b301203fb8470e4968daee13cfe80bb1896f8cdba2e2
Python
133,953
3,490
import multiprocessing import os import os.path as op import random from typing import List, Self, Tuple, Union import cvxpy as cvx import nibabel as nib import numpy as np # import numpy.matlib as npm import scipy.linalg as sla from joblib import Parallel, delayed from scipy.special import factorial, gamma, hyp1f1 fr...
8f0098f74e720837f3c33d3e2a113df349394a37ed6b88b934172783dee558ec
Python
135,060
3,609
import datajoint as dj import torch import numpy as np from .utils import list_hash, key_hash, deepdraw, process, unprocess, SpatialTransformerPyramid2d, roll from attorch.regularizers import Laplace from neuro_data.static_images.data_schemas import StaticMultiDataset, InputResponse, StaticScan, meso from neuro_dat...
e8de10e88251a19d77fbb905920a70f94a332129fb75f691ea218ed8dd7085c2
Python
135,387
2,737
# coding: utf-8 """Scikit-learn wrapper interface for LightGBM.""" import copy import warnings from inspect import signature from pathlib import Path from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union import narwhals as nw import narwhals.dependencies as nwd import narwhals.typing as ...
37d09c0c0ff76f246cc22d10d8f7f489e3143cc4c7702761c22c4642e59784d5
Python
138,443
2,744
""" YASA code for evaluating the agreement between two scorers (e.g., human vs YASA), either at the epoch-by-epoch level or at the level of summary sleep statistics. Analyses are influenced by the standardized framework proposed in Menghini et al., 2021, SLEEP. See the following resources: - https://doi.org/10.1093/sl...
d4b7a375790ec5b73c7b69aa0567650362d136ace2b182d24368df31cde2f0c1
Python
139,709
2,910
from __future__ import annotations import json import h5py import traceback import numpy as np import traceback from tqdm import tqdm from pathlib import Path from typing import Optional, Union, BinaryIO, TextIO from dataclasses import dataclass from scipy.spatial.distance import cdist import torch from torch_geometr...
cba550474b9664a21c682341bb740b2f6d51c96cbc7d43a2e5e3f4946909f730
Python
142,712
2,836
""" This file contains functions to edit/preprocess volumes (i.e. not tensors!). These functions are sorted in five categories: 1- volume editing: this can be applied to any volume (i.e. images or label maps). It contains: -mask_volume -rescale_volume -crop_volume -crop_volume_around_reg...
9b1a44eb04ae48ce0e68de42bdfd5e072fab0f93a4dd8703de8a3f3d36299554
Python
143,046
3,635
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import csv import json from http import HTTPStatus from io import BytesIO, StringIO from typing import Any from zipfile import ZipFile import pytest from cvat_sdk.core.helpers import get_paginated_collection from deepdiff import DeepDiff from rest_...
f955f5103b5b966f76475916cc00130ae17bd0fe4565d531a3626bce556f7752
Python
143,882
3,576
from __future__ import annotations import copy import enum import functools import math import os import platform import re import subprocess import time import typing import webbrowser from pathlib import Path from typing import Final from typing import Literal from typing import NamedTuple from typing import TypeAli...
932a0cc70123deb061284cb8c1e863ddc6fdc71a38256c7379160ce11d13438e
Python
145,207
3,473
""" YASA (Yet Another Spindle Algorithm): fast and robust detection of spindles, slow-waves, and rapid eye movements from sleep EEG recordings. - Author: Raphael Vallat (www.raphaelvallat.com) - GitHub: https://github.com/raphaelvallat/yasa - License: BSD 3-Clause License """ import logging from collections import Or...
50d197d79949511da46179bd8fb7dc5b5182a074808102710fa0d61cacb493d4
Python
146,301
2,464
import logging from typing import Dict, List, Tuple from math import ceil, prod import numpy as np from zigzag.classes.mapping.combined_mapping import Mapping from zigzag.classes.mapping.combined_mapping import FourWayDataMoving from zigzag.utils import pickle_deepcopy logger = logging.getLogger(__name__) class Por...
55f7d4a76fc42b961c2bea240758ec57ad3d26e711ba46439e55a650cd42bd6b
Python
147,430
3,003
""" Schemas for structural stacks. """ import datajoint as dj from datajoint.hash import key_hash import matplotlib.pyplot as plt import numpy as np import scanreader from scipy import signal from scipy import ndimage from scipy import optimize import itertools from . import experiment, notify, shared, reso, meso anat...
4bd6573fbef1a7ff746b88b5f8d6847e2a06666d68a53cab36c6ae62cdd4b2f3
Python
148,447
3,309
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license from __future__ import annotations import math import random from copy import deepcopy from typing import Any import cv2 import numpy as np import torch from PIL import Image from torch.nn import functional as F from ultralytics.data.utils import p...
575a982b73e88a2863828c593fdeec061414092f62c059e649308d436485fd2a
Python
148,708
3,526
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='caffe.proto', ...
9aefd528a7e16113564db400bdb97de6db299141ee070bc1425b487a203af90a
Python
149,982
3,921
# Copyright (C) 2018-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import itertools import os import os.path as osp import re import shutil import textwrap import traceback import zlib from abc import ABCMeta, abstractmethod from contextlib import suppress from copy import...
03bbfb03b987d295cc7cc904986754023c01ca7ca908e247c73e1d0db79c38ad
Python
150,017
2,963
import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib import gridspec import seaborn as sns import numpy as np import pandas as pd import pingouin as pg import copy import diptest from statsmodels.stats.anova import AnovaRM from statsmodels.stats.multicomp import pairwise_tukeyhsd from s...
05b74662fe5018b423b243dcf90e1e46ce91f8a77f901e2f8766dc5d3ea4f5e6
Python
152,865
4,099
import datajoint as dj import torch import numpy as np from numpy.linalg import eigvals from attorch.regularizers import Laplace from scipy import ndimage from scipy.optimize import minimize from scipy.interpolate import interp1d from scipy.ndimage.filters import gaussian_filter from skimage.morphology import convex_hu...
2357ca270fa3fd26a2fbd1f76c6f55c292291a3336e3073623e2f6991394512a
Python
162,402
4,103
""" Copyright 1999 Illinois Institute of Technology 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, publis...
1880ec291b9604dd174798a926ec47712eda4a7dece1884591f619665004c148
Python
163,107
4,415
# Copyright (c) 1999-2002 Gary Strangman; All Rights Reserved. # # This software is distributable under the terms of the GNU # General Public License (GPL) v2, the text of which can be found at # http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise # using this module constitutes acceptance of the t...
7ed8f172073d4204b42f7d836b088d4120ef980362c1f5e578dd230a82378b1a
Python
163,159
2,516
""" Elikopy @author: qdessain, msimon """ import datetime import os import json import shutil import time import subprocess import matplotlib.pyplot import matplotlib import elikopy.utils from elikopy.individual_subject_processing import (preproc_solo, dti_solo, white_mask_solo, noddi_solo, diamond_solo, mf_solo...
e763af507f0875bebfd912c61ff547069094c14365f5dffc4e39b9817afef4b8
Python
164,483
3,425
# baseline pytorch framework import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader, random_split import torch.nn.functional as F from torchvision import transforms from torchvision.datasets.folder import default_loader from torchvision.datasets.utils import download_url # plotting and dat...
0847f61f51a6a3fc9b3ad5c2b4b6a56cda25ebf9fdea2c7992c4630ded0cd59c
Python
165,147
3,242
"""GenoCAE. Usage: run_gcae.py train --datadir=<name> --data=<name> --model_id=<name> --train_opts_id=<name> --data_opts_id=<name> --save_interval=<num> --epochs=<num> [--resume_from=<num> --trainedmodeldir=<name> --recomb_rate=<num> --superpops=<name> --generations=<num> --phenofile=<name> --pheno=<name> --rand_spl...
8c721dc1e2dfc613ffa8559d2acdbdf1ed64c946e33bc5817e73f603b6ca95b7
Python
169,010
3,013
import datajoint as dj import numpy as np from itertools import product from scipy import ndimage from functools import partial import math import torch.optim as optim from skimage import morphology from tqdm import tqdm import torch from torch import nn import torch.nn.functional as F import os import pickle import ra...
550a588125d03945de7696b9977bf548fe34112cc9a2e1cf6d7f57f41d8de414
Python
177,859
3,389
import numpy as np import random from scipy.stats import norm from scipy.stats import multivariate_normal import pickle import itertools def agent_run(learner, rewards, world): state_new, reward_new = world.next_state(learner, rewards) if not world.passive: feature_iw = 0 learner.update_estima...
30833a5581464c59ee154752afaab5e526ab073e51ffbcecfccc7f0718fb2b8f
Python
184,704
3,763
# Standard library import importlib import importlib.metadata try: from importlib.resources import files tmp = files('encore.gui') except (TypeError, ImportError): # Python < 3.10 from importlib_resources import files import math import os import pickle import sys import time from datetime import datetime ...
b6dfc29ef4debc27532bff7551c8e27f072ea673c91234102fae0d5951360495
Python
185,162
4,774
import os, csv from abc import abstractmethod from torch.utils.data import Dataset, random_split from typing import List, Dict, Union import re import logging from pathlib import Path import torch.utils.data.dataloader from torch.utils.data.dataset import Subset, ConcatDataset import flair from flair.data import Sen...
436a2728f8601e8347ea2b6ddecbbe2d524791e4fe395c1b08f9627b73bc6ff8
Python
185,627
4,783
import os, csv import json from abc import abstractmethod from torch.utils.data import Dataset, random_split from typing import List, Dict, Union import re import logging from pathlib import Path import torch.utils.data.dataloader from torch.utils.data.dataset import Subset, ConcatDataset import flair from flair.data...
c3ced851de9351c81fc94dc61cfb8614fcefe3e4d101fbe988ca58c0a336777b
Python
191,111
27
import math ################################# ##### ENERGY PARAMETERS ##### ################################# interior_loop_lengths = [math.inf,math.inf,math.inf,math.inf,1.7,1.8,2.0,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3.0,3.0,3.1,3.1,3.2,3.3,3.3,3.4,3.4,3.4,3.5,3.5,3.6,3.6,3.6,3.7] bulge_loop_lengths = [math.inf,3...
dd73bdeda15bdacb2431ed71fb345618f955651fa4825854097ec2fa7cde5080
Python
194,370
4,439
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: caffe_fastrcnn.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protob...
f9a7e80f5a9e72979d80060c1367ffc1023179264cdcf1f3164d87c8779c6b9e
Python
194,568
4,956
# Copyright (C) 2019-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT from __future__ import annotations import mimetypes import os import re import shutil import string import textwrap import uuid import warnings from collections import OrderedDict from collections.abc impo...