sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
0eeed92a6db34b1280ee0eb41dc5eeb2074e9695ec2dfb8ea3aa6261b991c7f3 | Python | 58,248 | 995 | import difflib
import itertools
import logging
import os
import copy
import pickle
import random
import subprocess
from argparse import ArgumentParser
from pathlib import Path
from typing import List
import atom3.case as ca
import atom3.complex as comp
import atom3.conservation as con
import atom3.database as db
impor... |
c99b84b97a6e3d7f9114c7d759f0335114e447dfd43366e83b59211649b68fbc | Python | 58,324 | 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... |
2a60e746eb18e8c6d1897337aa919557d874d839f4b823f096e89020e74b930d | Python | 58,326 | 1,626 | # Copyright (C) 2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
from __future__ import annotations
from collections import namedtuple
from collections.abc import Sequence
from enum import StrEnum
from typing import TYPE_CHECKING, Any, cast
from django.conf import settings
... |
742b03687cc85b26f282635ce6fc4d23cb8d597559b2c6afd0b504d7b6d3fbb8 | Python | 58,501 | 1,658 | """
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... |
f1fe7b548e6dbaf50f6bb2d019082f9f72546f8cae9459a13a9ac0c559d0efcc | Python | 58,507 | 1,323 | import numpy as np
import warnings
import tables
from tierpsy.helper.misc import TimeCounter, print_flush, get_base_name
from tierpsy.helper.params import read_fps
from tierpsy.analysis.stage_aligment.get_mask_diff_var import get_mask_diff_var
def _matlab_std(x):
if x.size <= 1:
#in array of size 1 MAT... |
091ea32679d3d7bed983b11318c91ae869b30c1532120192ec1ae1933288e8c4 | Python | 58,597 | 1,512 | # Copyright (C) 2021-2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import io
import itertools
import mimetypes
import os
import re
import shutil
from abc import ABCMeta, abstractmethod
from collections import defaultdict, deque
from collections.abc import Collection, Itera... |
396b3b28251792428d725b95232a524726ad080f51d753f4161605ca1fc5e781 | Python | 58,695 | 1,807 | 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,
... |
d5ce25f78d04bf8a2824114ea3be230d737deacaf25adbc96dcfb7bb55e09276 | Python | 58,710 | 1,492 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# Python standard library
from __future__ import print_function
from shutil import copytree
import os, re, json, sys, subprocess
# Local imports
from utils import git_commit_hash, join_jsons, fatal, which, exists, err
from . import version as __version__
def init(
... |
688d4501d77ebbb83cc0b8f449a3928852194c54a6990549a4bf61b9704955ff | Python | 58,783 | 1,466 | import os
import h5py
import torch
import numpy as np
import json
import random
from pathlib import Path
from multiprocessing import Pool
from typing import List, Tuple, Dict, Optional, Union
from torch_geometric.data import Data, Dataset, Batch
from torch_geometric.loader import DataLoader
from tqdm import tqdm
impor... |
81ec26466347dcd65502dec8bb9de9d6b435e54869e25381288a8de9b3620bc3 | Python | 58,815 | 1,173 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import warnings
from collections import OrderedDict
import torch
from tqdm import tqdm
from .modeling.sam2_base import ... |
fd8d81a096385ac7d9d65658411643d67a954b981bb84af0b5287e6cd1d2fafe | Python | 58,898 | 1,582 | # Copyright (C) 2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
from __future__ import annotations
import base64
import io
import json
import os
import re
import textwrap
from copy import deepcopy
from datetime import timedelta
from functools import wraps
from typing import... |
4ef3c11e9c60c653e7f06ea91718a708ed3a39d251eea8653ef33c61096966e6 | Python | 59,053 | 1,890 | __all__ = [
"linregress_ting",
"linregress_array",
"linregress_bst",
"time_swap_array",
"column_cycle_array",
"trajectory_score_array",
"trajectory_score_bst",
"get_significant_events",
"three_consecutive_bins_above_q",
"score_hmm_time_resolved",
"score_hmm_logprob_cumulative... |
d31519f257dd8f7089d77cd0bf0f1c99bf37cdd149ce7b326a1033ee77a55a8a | Python | 59,153 | 1,200 | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 14 20:17:42 2024
@author: aka2333
"""
#%%
from itertools import permutations, product
import time
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import numpy as np
import pandas as pd
import f_stats
import f_subspace... |
0e0f7b396f6a06ad942339d8a6b1cf0b480d9a39cf993ae6630d0a3e0fc8b952 | Python | 59,169 | 1,487 | """
TMS Explorer was developed to assist with the data preprocessing of transcranial
magnetic stimulation (TMS) as part of the study "Transcranial direct current
stimulation (tDCS) and mindfulness meditation in fibromyalgia" in the "Non-
invasive brain stimulation lab" (NBS) at the university medicine Göttingen ... |
6c7e155e6eca2d18c61613495ff75c888c798e7e8b0fb64596d8ff4a531e6110 | Python | 59,187 | 1,300 | import os
import sys
import glob
import shutil
import time
from datetime import datetime
import re
import glob
import numpy as np
import torch
import torch.nn as nn
import matplotlib
# If running headless (no GUI), uncomment:
# matplotlib.use('Agg')
import matplotlib.pyplot as plt
from utils import CNN, get_loader, t... |
56d859c87913388f6ed34dd3de5ea98eca95e5d84ab746ae0a316e807d46e022 | Python | 59,256 | 1,864 | # Copyright (C) 2018-2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
from __future__ import annotations
import datetime
import re
import shutil
import uuid
from abc import ABCMeta, abstractmethod
from collections.abc import Collection, Iterable, Sequence
from enum import En... |
f3aac9615679710429ab50283f5a1076d62a44aa7c626be37d5901751fb77581 | Python | 59,327 | 1,694 | # laminar_rs/plots_embedding.py
#
# RSN-based embedding plots, supporting both Yeo-7 and Yeo-17 partitions
# for the Schaefer-400 and Glasser/HCP-MMP1.0 atlases.
from __future__ import annotations
from pathlib import Path
from typing import Tuple, List, Optional, Literal, Sequence
import numpy as np
import matplotlib... |
0ca555cd2324d8d821bff87e2adf4be348071be1de4ced9736a7cb19125ecf08 | Python | 59,334 | 1,187 | # Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
import logging
import torch
import torch.nn.functional as F
from .memory import SimpleMaskEncoder
from .sam3_tracker_utils import get_1d_sine_pe, select_closest_cond_frames
from ..sam.mask_decoder import MaskDecoder, MLP
from ..sam.prompt_enc... |
9a6483d0fb2693d021da25582d325d444412ee8512995e1a78d52db89357568a | Python | 59,340 | 1,767 | import bct
import warnings
import numpy as np
import scipy.sparse
from numba import njit
from typing import Literal
"""
SECTION: Graph processing functions
- General functions to preprocess connectivity/adjacency matrices
before graph analysis.
"""
def handle_negative_weights(G: np.ndarray,
... |
c469962aeb0da6a9949be14404e3d58580a901fc744241d75be079385a64fb06 | Python | 59,813 | 1,025 | # Forward Inclusion Backward Elimination
# Copyright (c) Mohammad Arafat Hussain, Boston Children's Hospital/Harvard Medical School, 2023
# 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 with... |
ba4e25837faff0fdd8b10de9cfad3a72f40c94037af3bb72bc817684c8809cce | Python | 60,017 | 1,494 | import os
import traceback
import numpy as np
import cv2
import matplotlib.patches as mpatches
from PySide6.QtWidgets import (
QMainWindow,
QVBoxLayout,
QHBoxLayout,
QTableWidget,
QTableWidgetItem,
QPushButton,
QHeaderView,
QAbstractItemView,
QLabel,
QSizePolicy,
QMenu,
Q... |
794395980ce3a33e8b9f2f4444e04981373842d6faca83676c7345850809078f | Python | 60,114 | 1,405 | """
LIST OF FUNCTIONS
LoadAndCrop
Measure_Motion
cropframe
Measure_Freezing
Play_Video
Play_Video_ext
Save_Data
Summarize
Batch
Calibrate
"""
########################################################################################
import os
import sys
import cv2
import fnmatch
import numpy as np
impor... |
0d2fd6a5ae3be5f020885ec9b1fcad0a27678bdc1dd5f3bc9a34f7771a85fdaf | Python | 60,385 | 2,102 | # tifffile/geodb.py
# Copyright (c) Christoph Gohlke
# SPDX-License-Identifier: BSD-3-Clause
"""GeoTIFF GeoKey Database.
Adapted from http://gis.ess.washington.edu/data/raster/drg/docs/geotiff.txt
"""
from __future__ import annotations
import enum
class GeoKeys(enum.IntEnum):
"""Geo keys."""
GTModelTyp... |
f878ba363d597eab0bd52766a326e6928ffc303e9203aa6d746d6f704aee478d | Python | 60,721 | 1,439 | import datetime
import hashlib
import inspect
import json
import os
from dataclasses import dataclass
from pathlib import Path
import time
from typing import Any, Callable, Collection, List, Optional, Sequence
import uuid
from chemgraph.agent.events import EventCallback, _AstreamEventCallback
from chemgraph.agent.usag... |
d969046588c2c814f1439761e69c831a5fd3e5c59a9ab0e6334ebf4229f74458 | Python | 60,892 | 1,342 | import multiprocessing
import os
from pathlib import Path
import numpy as np
import nibabel as nib
import nibabel.processing
import time
import sys
from scipy import sparse
from matplotlib import pyplot as plt
from nilearn import plotting, image
from scipy import ndimage
import argparse
import tempfile
import subproc... |
59feec80a2eea805489020f4df72ee20a2c2794aeb9de760384683b0e2504eb2 | Python | 60,911 | 1,383 | # This file is part of connectome-manipulator.
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Blue Brain Project/EPFL
import os
import morphio
import neurom as nm
import numpy as np
from numpy.testing import assert_array_equal
import pandas as pd
from bluepysnap import Circuit
from bluepysnap.morph imp... |
87789457b1175363a5e169ff7452456bbde33e01547e98137df708a043c257c2 | Python | 60,926 | 1,763 | """Handle training and prediction for DANNCE and COM networks."""
import sys
import numpy as np
import os
from copy import deepcopy
import scipy.io as sio
import imageio
import time
import gc
import tensorflow as tf
import tensorflow.keras as keras
import tensorflow.keras.losses as keras_losses
from tensorflow.keras.mo... |
840136f19e9a8cd5abf5c445480692c19d81e7a62c91e2984abd4d8b1bdc61df | Python | 60,969 | 1,022 | import inspect
import itertools
import multiprocessing
import os
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... |
fe1c3961a210e4785bce05fbe104be1282811e099df272f7f34119206c1cce7b | Python | 61,022 | 2,281 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 12 17:05:00 2022
@author: proussel
"""
import os
import sys
import shutil
import numpy as np
import pandas as pd
import tempfile
import re
import fnmatch
import io
from itertools import repeat
import multiprocessing
from abc import ABC
import itk
... |
02411828b023a90ece4799d3d32ba6293b010b51e765ec0c7d69dbbac2d10e91 | Python | 61,078 | 1,284 | # 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... |
068f4f6e8667eacc69db3e5d0289737d2b9c9fa17dfeb9f25a033c01fafbe85a | Python | 61,148 | 1,818 | import numpy as np
import pandas as pd
import commot as ct
import scanpy as sc
from scipy import special
import scipy.sparse as sp
from mpl_chord_diagram import chord_diagram
from scipy.spatial.distance import pdist, squareform
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
import plotly.... |
c7c6a7224fbe8409016b4d2838b596fab70f1cc7f8e9401e7345cc50864fd18b | Python | 61,282 | 1,155 | import logging, warnings
from collections import defaultdict, OrderedDict
import numpy as np
# import plotly.express as px
from .utils import graph
from .utils import neighbors as nb
from .utils import util
from .utils import vis
from network_flow_tracker.EdgeFlow import EdgeFlow
class FlowGraph(graph.SpatialGraph):... |
33d6cdf3dc75510571b58e2e231614ab248583d7580889f0f66f601273f7cc25 | Python | 61,464 | 1,520 | import numpy as np
import os
import torch
import torch.nn as nn
import decimal
from torch.utils.data import Dataset, DataLoader, TensorDataset
import math
import time
from datetime import datetime, timedelta
import re
ctx = decimal.Context()
PARAM_TYPE_ZERO = 'zero'
PARAM_TYPE_BACKGROUND = 'background'
PARAM_TYPE_LAT... |
1cf9e9d8acd360bfe0f1125cea443b3484451a43d7e091b6e6f0f0261f1d8749 | Python | 61,478 | 1,460 | #!/usr/bin/env python3
import cv2
import numpy as np
import csv
import os
import time
import threading
import configparser
import sys
from ultralytics import YOLO
import tkinter as tk
from tkinter import ttk, messagebox, filedialog
from collections import deque
import platform
import subprocess
import box_geometry as b... |
1b5260c837a7686a104585247765b0e68d1d162c1fdcbd32ae0c776ce19441a6 | Python | 61,490 | 1,598 | # -*- coding: utf-8 -*-
"""
Section 4 - Phen association with cell types or embryo times
"""
import scanpy as sc
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib as mpl
import os
import warnings; warnings.simplefilter('ignore')
import anndata
... |
5d89296d30ab407ce2fbdaab0706dca66e94260bd5c35bbcc6a2f7f0ae5cadab | Python | 61,514 | 1,561 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import contextlib
import importlib.metadata
import inspect
import json
import logging
import os
import platform
import re
import socket
import sys
import threading
import time
import warnings
from functools import l... |
488e664dcba4e8a0400127168fec0d9b759c3aff810640d43a7b2da26fed0273 | Python | 61,681 | 1,370 | import math
import numpy as np
import nibabel as nib
import pyvista as pv
import urllib.request
import importlib_resources
from pathlib import Path
from typing import Any, cast
from scipy.io import loadmat
from matplotlib import cm as mpl_cm
from matplotlib.colors import ListedColormap
nib.imageglobals.logger.setLevel... |
9a81db15a62fb3dd7614d200dc6e60a7203d9b01a8879040771db1b9ed4b146e | Python | 61,708 | 1,474 | """Composite widget for image-alignment detection.
Owns the :class:`ImageAlignmentTable`, threshold controls, the detection
button, and all multiprocessing logic for batch centre/rotation detection
and pairwise image-diff calculation.
The parent window creates the widget, places ``widget.table`` wherever it
likes in ... |
42e9d978e365372adabee0226ae2414def61384edfcae58c8cf143bb91f0926d | Python | 61,779 | 1,138 | # MODIFIED BY SMM TO TREAT CYCLIC PEPTIDES and Aidan to prevent HIS/unknown residue issue
#Commented by Marc, August 2021
#This program takes an input topology using the modified Amber forcefield and outputs a converted topology using the RSFF2 forcefield. This program was modified to handle cyclic peptides but shoul... |
e3ec2e147ba2f7e86b14f8362a03f678950bf50022e8f91c90fbfc27671ead83 | Python | 61,797 | 1,527 | import numpy as np
import matplotlib.pyplot as plt
import scipy.io
import math
import copy
import csv
import tifffile
import os
import pandas as pd
from scipy.interpolate import splprep, splev
from scipy.integrate import quad
from scipy import ndimage
from skimage.transform import resize
from scipy.ndimage... |
ace3e45d3be03870ff1023aa9eeb0b1caf60a948c849a11ed9d0c94a8793a374 | Python | 61,809 | 1,560 | 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... |
b37cf10e035f58a638471e6607936822f532ee679bf9df3fd3e0c85706913b56 | Python | 61,872 | 1,343 | import numpy as np
import matplotlib.pyplot as plt
import alphashape
from sklearn.decomposition import PCA
from sklearn.neighbors import NearestNeighbors
from sklearn.metrics import f1_score
import h5py
import scipy
import seaborn as sns
from matplotlib.colors import rgb2hex
import pandas as pd
from scipy.spatial impor... |
7a16ea6a5a652503e82b7749796a1a7ee37211f7418647b82e3e2d6665221efc | Python | 61,991 | 1,880 | import copy
import logging
import numpy as np
from scipy.special import logsumexp
from sklearn.base import BaseEstimator
from sklearn.utils.validation import check_is_fitted
from . import core
from .plotting.core import _plot_ratemap
from .preprocessing import DataWindow
from .utils_.decorators import keyword_depreca... |
91b2f88c30faf05b5151736c3322bfea7c613954e183897651f87ddfaa2df13e | Python | 62,014 | 1,747 | '''
Estimators that are GPU-ready to make analyses quick and easy.
NOTE: Support for torch is still experimental. I have weeded
out most bugs and, generally, it seems to work quite well. However,
there are some things to keep in mind. One of the key things
that I have found testing simulated data and real neural data... |
e6a33ad47785df818952f5d7ff94bc8e166f06906158d798437579a62b3f29a0 | Python | 62,230 | 1,056 | # Forward Inclusion Backward Elimination
# Copyright (c) Mohammad Arafat Hussain, Boston Children's Hospital/Harvard Medical School, 2023
# 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 with... |
af6d1b140745984e0c963cdeaa626308278ef583994b247e4d59741896fde7a9 | Python | 62,403 | 1,363 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import json
from collections import defaultdict
from itertools import repeat
from multiprocessing.pool import ThreadPool
from pathlib import Path
from typing import Any
import cv2
import numpy as np
import torch
fr... |
844f7d6be1221ab617533a6685674a9f5221d58eec4ee559c1d849f2cf8718a5 | Python | 62,587 | 1,271 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import inspect
from collections.abc import Iterator
from pathlib import Path
from typing import Any
import numpy as np
import torch
from PIL import Image
from ultralytics.cfg import QUANTIZE_ALIASES, TASK2DATA, _h... |
aaa5ea28c03f765bede55a61f620b63fb920ddb5b7bfe1aac9c33079b3a8d675 | Python | 63,125 | 1,475 | #####
# SpineCompressionFE.py
#
# This script replaces the L4 vertebral compression FE model. It sets up a FAIM micro-FE model
# from the density (K2HPO4) calibrated image.
# This script sets up the model for a L4 vertebra (including arch and
# pedicles). The analysis resamples the image to isotropic voxels, transfor... |
de0f8af723f174f9a7b723b82ed0eae0c66a82f9802f7525ac0cc157557c9981 | Python | 63,136 | 1,292 | import datajoint as dj
import featurevis
import numpy as np
import itertools
from functools import partial
from itertools import product, repeat
from tqdm import tqdm
import torch
from torch import nn
from torch.nn import functional as F
import torch.optim as optim
from torch.autograd import Variable
from attorch.laye... |
73e040c69a71c8a338f334124ce1c0fc6cd83f574add9570800a4c41b21fe3a9 | Python | 63,163 | 1,072 | # Forward Inclusion Backward Elimination
# Copyright (c) Mohammad Arafat Hussain, Boston Children's Hospital/Harvard Medical School, 2023
# 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 with... |
c706c0f359ea6de1b3152a3f26b7f18abf8a6053a5b0780cf5e90dbd2f08dac4 | Python | 63,244 | 1,662 | # Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
import colorsys
import logging
import math
import random
from enum import Enum, unique
import cv2
import matplotlib as mpl
import matplotlib.colors as mplc
import matplotlib.figure as mplfigure
import numpy as np
import pycocotools.mask as mask_... |
2e1226719795ffd8e27973e82897ec121b0da7c90fb1b074cf7a231e0ef8a285 | Python | 63,459 | 1,182 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
from __future__ import annotations
import torch
import torch.nn.functional as F
from torch import nn
from torch.nn.init import trunc_normal_
from ultralytics.nn.modules imp... |
5744adce2434e177fdd3b7aa83928df1323411b648a8b034110d2beed7ae9fa4 | Python | 63,515 | 1,354 | """
Defines the various layers in the SignalingModel RNN.
"""
from typing import Dict, List, Union, Annotated, Any
from annotated_types import Ge
import copy
import pandas as pd
import numpy as np
import scipy
from scipy.sparse.linalg import eigs
import torch
import torch.nn as nn
import torch.nn.functional as F
f... |
7202994c6872917fbb6819149a59bf5b079d5c34e15196dfc02d25d39d482e4c | Python | 63,589 | 1,355 | """
Defines the various layers in the SignalingModel RNN.
"""
from typing import Dict, List, Union, Annotated, Any
from annotated_types import Ge
import copy
import pandas as pd
import numpy as np
import scipy
from scipy.sparse.linalg import eigs
import torch
import torch.nn as nn
import torch.nn.functional as F
f... |
5936e84f470b6e3bd77b8902f0f764fc4efb09dd38281436802577c98c26a638 | Python | 63,607 | 1,302 | import os
import fnmatch
import json
import math
import pandas as pd
# from pandas import DataFrame
def find_and_remove_substring(s, a, b):
start = s.find(a) + len(a)
end = s.find(b, start)
substring = s[start:end]
return substring
batchsize=16
# 批量打开JSON文件
# pre_files_path = 'aicore_S-ResNet... |
907aded2df9918c6b9613293e0efb063d8d152aaaa216f1fe34c21dbd43a51d9 | Python | 63,991 | 1,560 | import os
import traceback
import numpy as np
import cv2
import matplotlib.patches as mpatches
from PySide6.QtWidgets import (
QMainWindow,
QVBoxLayout,
QHBoxLayout,
QTableWidget,
QTableWidgetItem,
QPushButton,
QHeaderView,
QAbstractItemView,
QLabel,
QSizePolicy,
QRadioButton... |
5d175823367393e832c0fb93d9ee910e8eeceb33dab8bacbc6ab38a98dac1b9f | Python | 64,025 | 1,618 | import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import least_squares
from skimage.transform import resize
class EllipticalSAXSFitter:
"""
Fits 2D SAXS patterns using elliptical cylindrical coordinates
as described in Murthy et al., Polymer 1997.
"""
def __init__(
se... |
3387d614efc228a4ec3c38e34b71415ecaeb3b6e4cc55b6c3965ccb3e4b29dd7 | Python | 64,177 | 1,303 | import os
import fnmatch
import json
import math
import pandas as pd
# from pandas import DataFrame
def find_and_remove_substring(s, a, b):
start = s.find(a) + len(a)
end = s.find(b, start)
substring = s[start:end]
return substring
batchsize=16
# 批量打开JSON文件
# pre_files_path = 'aicore_S-ResNet... |
0993a94ae3e0f4762b68a8fd83bb8f2b8db4b21a2644fe219a9401ff3acfa6b9 | Python | 64,341 | 1,568 | """
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... |
ad923f4837da10871acabbb2b83c3771a922f78c4e4f3c844d88098aad776583 | Python | 64,350 | 1,314 | #############################################################################
# Copyright (C) 2020-2026 MEmilio
#
# Authors: Martin J. Kuehn, Wadim Koslow
#
# Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complian... |
b186ee03fa45c9d21d2a3e25580f88661bcf57ff2defb106ace943a19c69d5fe | Python | 64,350 | 1,314 | #############################################################################
# Copyright (C) 2020-2026 MEmilio
#
# Authors: Martin J. Kuehn, Wadim Koslow
#
# Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complian... |
e8ff95ba415756c450734fb731871953565e84c8743c72ecb00274bf513a1cb2 | Python | 64,350 | 1,991 | import argparse
import logging
import os
import shutil
import sys
import textwrap
import warnings
from typing import Tuple
from . import __version__
from .config import (
COMPILED_DIR,
get_bustools_binary_path,
get_kallisto_binary_path,
is_dry,
no_validate,
PACKAGE_PATH,
set_dry,
set_bu... |
7ccb216371d5e6a8f4169f98871ccdc4832c88609934cb1416117a012742eb55 | Python | 64,359 | 1,284 | """ Basic tables to be shared by everybody: UnitRanking, MEI, MEIMask"""
import datajoint as dj
import featurevis
import numpy as np
import torch
import pandas as pd
from featurevis import models
from featurevis import ops, utils
from neuro_data.static_images import data_schemas, stats
from staticnet_experiments impor... |
19e478e42861eb14bfc1b118c4434a6308cb008d12fca7237a1908dc2491b760 | Python | 64,433 | 1,783 | import logging
from collections.abc import Mapping, MutableMapping
import nibabel as nib
import numpy as np
from dipy.io.streamline import load_tractogram
import AFQ.data.fetch as afd
import AFQ.utils.volume as auv
from AFQ.definitions.utils import find_file
from AFQ.tasks.utils import get_fname, str_to_desc
logger ... |
b546ae0d42e1903b87aa4cf65c6ec2051a1690cc3851dfccd23b21c7fa83cca8 | Python | 64,599 | 1,265 |
import logging, warnings
import inspect
from collections import defaultdict, OrderedDict
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from .utils import graph
from .utils import util
from .utils import vis
from .utils import stat
class EdgeFlow():
def __init__(self, el, cc_ind, mask... |
8237eec69f4f145c474d1a3d78fd2e8a7daa05397c8d21d097312422f9e6f6d5 | Python | 64,791 | 1,318 | from graphpancake.functions import *
import numpy as np
class DictData:
"""Memory-optimized data container using __slots__."""
__slots__ = [
'graph_type', 'id', 'smiles', 'formula', 'molecular_mass', 'num_atoms',
'xyz_coordinates', 'atomic_numbers', 'atom_labels', 'polarizability',
... |
89fcb013968bfc584ea373d82f2f5516818da655c98fce4c96566f945bf402d0 | Python | 65,037 | 1,501 | # -*- coding: utf-8 -*-
"""
step3p5_distribution_classification.py
Purpose (updated):
1) Classify each sample folder's Rwp => CLOSE, BOUNDARY, or INVALID.
2) Log results into classification_report.dat, with columns for
all user-changed parameters (ZeroShift, Biso, Scale, U, V, W, etc.).
3) If ratio of CLOSE... |
792e14eb66156568913e81e60f5520c3b8addb5e01bd1a1327dd7dd06fe7a859 | Python | 65,310 | 1,840 | """Widget implementations (adaptors) for the Qt backend."""
from __future__ import annotations
import math
import re
import warnings
from collections.abc import Callable
from contextlib import contextmanager, suppress
from functools import partial
from itertools import chain
from typing import TYPE_CHECKING, Any
imp... |
8d651fb365b18091ef36e7db9600f0a71f83f64ed2cd889479f54a0d896f31de | Python | 65,400 | 1,156 | # Kai Sandbrink
# 2023-06-23
# Analyze behavior across days
# %% LIBRARY IMPORT
import numpy as np
import pandas as pd
import os
from sklearn.metrics import mean_squared_error
import pickle
import seaborn as sns
import matplotlib.pyplot as plt
from scipy.stats import pearsonr
from human_utils_project import sort_t... |
1bb266506e98e4b0f121ed6cf0cb6115e8536fce779396fb9b634d2853212692 | Python | 65,684 | 1,461 | """The spike and burst viewer: what it shows, and what it hands back.
Spike detection is the step whose output nothing downstream can check for you,
so the viewer exists to be looked at — which makes most of it untestable
without eyes. What *is* testable is the part that would silently mislead: the
quality numbers pri... |
c2b293188b94078ca25cd74c791a69d729303f5ef47fc4d5de1c49b20b41f2ac | Python | 65,797 | 1,302 | import os
import fnmatch
import json
import math
import pandas as pd
# from pandas import DataFrame
def find_and_remove_substring(s, a, b):
start = s.find(a) + len(a)
end = s.find(b, start)
substring = s[start:end]
return substring
batchsize=16
# 批量打开JSON文件
# pre_files_path = 'aicore_S-ResNet... |
68aac72b35119ec8a27b1d77363a88362bb652c57fdc57a3bd473be2786d130b | Python | 65,848 | 1,381 | import re
import os
import pandas as pd
import shutil
import sys
import time
import matplotlib.pyplot as plt
import numpy as np
import random
import itertools
from mpl_toolkits.mplot3d import Axes3D
import sobol_seq
def align_zero_parameter(lines):
# Find the index of the zero parameter line
zero_line_index ... |
327d1be37c341c51f0833d06f29724a2d454324c75bd10e8bf874d837d190bde | Python | 66,066 | 1,562 | import logging
import weakref
import h5py
import nrrd
import numpy as np
import pandas as pd
from scipy.spatial.distance import cdist
from skimage.measure import find_contours
from tqdm import tqdm
from ccf_streamlines.coordinates import coordinates_to_voxels
from ccf_streamlines.linestring3d import LineString3D
HEM... |
f1e8b19e90a0b0de56bd9e0f64782375e3e6dbba6e39aff812e28f0f69c5335a | Python | 66,076 | 1,630 | # -*- coding: utf-8 -*-
from __future__ import annotations
# =============================================================================
# This code is released for the publication:
#
# "A Transparent AI Assurance and Benchmarking Framework for EEG Seizure
# Detection on TUSZ Seeded with a Reproducible Gradient... |
8f6bcfc4d8603f03324e8aea46fbb49a6d9a671e03bf1072ce4b3dddd2a930a2 | Python | 66,528 | 1,729 | # Copyright (C) 2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import io
import itertools
import json
import operator
import xml.etree.ElementTree as ET
import zipfile
from copy import deepcopy
from datetime import datetime
from http import HTTPStatus
from io import BytesIO... |
982f6220ccbcaa3da0d75654925d867b1b8310f87ba779b6463d7822c8a0de24 | Python | 66,548 | 1,030 | import glob2
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.colors import to_rgb
import os
from statannot import add_stat_annotation
import argparse
import pingouin as pg
import numpy as np
from scipy.stats import sem
import matplotlib as mpl
import matplotlib.styl... |
cf7e4c8a487bb04c682139b3e1830947e6b3b1689fde5e1b221d03dac64a5e59 | Python | 66,599 | 1,837 | # Copyright (C) 2021-2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import io
import json
import math
import operator
import os
import xml.etree.ElementTree as ET
import zipfile
from copy import deepcopy
from datetime import datetime
from http import HTTPStatus
from io impo... |
287436b9558e33bd6211bdd0e6caccdc7ba91b55f6bdb0706bef7aa4890d389b | Python | 66,719 | 1,459 |
#!/usr/bin/env python3
"""
NTCP Clinical Factors Analysis (Patched)
=======================================
This patched script adds robust column standardization and automatic detection/
creation of a numeric binary 'Observed_Toxicity' column to prevent KeyErrors
(e.g., when the column is named slightly diff... |
8da4d87163a0d750ec2ed2207a50936ef050c7047e734063e99bb1940f24801d | Python | 66,722 | 1,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... |
3a9e9ba3eca3134b600100bfbeef57363157b37921b3ee3d2bd6a534fd0db4ed | Python | 66,788 | 1,494 | import itertools
import torch
import numpy as np
import math
import gc
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.gridspec as gs
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.decomposition import PCA
import scipy.stats as stats
from tqdm.autonotebook import tqdm
import ... |
97bf4288078d70d83121df49ce6652a6c1ee0e14babf974dc6485fae874c71e9 | Python | 66,843 | 1,747 | from graphpancake.classes import DictData, Node, Edge, GraphInfo, Targets
from graphpancake.functions import *
import sqlite3
import json
import numpy as np
import pandas as pd
from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union
import logging
import json
# Optional imports for visualization... |
c000a8bfe5d929d19a621d510fb3ce050ad55380e028572986790b853a13b99a | Python | 66,969 | 1,689 | # Copyright (C) 2018-2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import os
import os.path as osp
import zipfile
from collections import OrderedDict
from collections.abc import Callable
from glob import glob
from io import BufferedWriter
from datumaro.components.annotati... |
489d32249534d15b4e83a5f86457e80291c4faa6a0d1f8b2b341a909e668f8b3 | Python | 67,079 | 1,125 | import difflib
import itertools
import logging
import os
import pickle
import random
import subprocess
from argparse import ArgumentParser
from pathlib import Path
from typing import List
import atom3.case as ca
import atom3.complex as comp
import atom3.conservation as con
import atom3.database as db
import atom3.neig... |
2d7a94961e6d0ab3c8200a8f7b2b8759478317f9dec78779cd497e4707c86859 | Python | 67,086 | 1,568 | import matplotlib.pyplot as plt
from matplotlib.colors import Normalize
import numpy as np
from ipywidgets import widgets
from CGAL.CGAL_Polyhedron_3 import Polyhedron_3
from typing import List, Tuple, Dict, Set, Iterable, Callable
from spine_fitter import SpineGrouping
from spine_segmentation import point_2_list, list... |
372554685cd5cad69e18b827a8438512e165332b96fe59cec1f53a853fed1fb9 | Python | 67,438 | 1,563 | import os
from warnings import warn
import datajoint as dj
import numpy as np
import sh
from pipeline.notify import temporary_image
import gc
from .. import experiment
from ..utils.signal import mirrconv
from ..utils import galvo_corrections
import matplotlib.pyplot as plt
from ..import notify
from distutils.version ... |
75a2d73e60e28538d870db7b6bd6f29d42adf322ab7c8d13f0602f1dc83f987d | Python | 67,441 | 1,674 | """
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... |
6a4bded2374b67453808c66379ab0bdbe76ac667f732ee75e9e49afaaed72545 | Python | 67,599 | 1,536 | import math
from glob import glob
import os
import pysam
import polars as pl
import pandas as pd
import numpy as np
import sys
import subprocess
from collections import OrderedDict, defaultdict
from itertools import product
from scipy.special import betainc
import shutil
from multiprocessing import Pool
import multipro... |
2151541b8c292e33fccb052961bfff89e39da334fc40c40b34d647d1175dd20e | Python | 68,020 | 1,257 | import inspect
import multiprocessing
import os
import shutil
import sys
import warnings
from copy import deepcopy
from datetime import datetime
from time import time, sleep
from typing import Union, Tuple, List
import numpy as np
import torch
from batchgenerators.dataloading.single_threaded_augmenter import SingleThr... |
2a856a233305ad80f01704ad05d0d6104684020e468d25f2be60009e1d541bea | Python | 68,156 | 1,747 | import itertools
import math
import numbers
import tempfile
import warnings
from abc import ABCMeta, abstractmethod
from collections import OrderedDict
from collections.abc import Mapping, Sequence
from copy import copy
from pathlib import Path
from typing import Any
import torch
from torch.optim.lr_scheduler import C... |
41cb8f121c6b4956b51e43e99baa2cfd3587cde8278fb689705ef9bac2033148 | Python | 68,257 | 1,263 | import inspect
import multiprocessing
import os
import shutil
import sys
import warnings
from copy import deepcopy
from datetime import datetime
from time import time, sleep
from typing import Union, Tuple, List
import numpy as np
import torch
from batchgenerators.dataloading.single_threaded_augmenter import SingleThr... |
f5cbe1a8703d03ccc0d19fb8786edf7c51703204403676b86aec3825e3abf74a | Python | 68,296 | 1,632 | try:
import altair as alt
alt.data_transformers.disable_max_rows() # prevent silent failures on larger data
except Exception:
pass
import itertools
from collections import defaultdict, Counter
from itertools import combinations
from threading import RLock
from typing import List, Tuple, Sequence, Optiona... |
ac63e269dd621b3079433d5fd1bb1a6dac7979b0ca9c03189414d612eaa7e559 | Python | 68,621 | 1,520 | import logging
from types import SimpleNamespace
import time
import re
import logging
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
from tensorflow.keras import Input
from keras import regularizers
from ..base import Backend, FitResults
from .cost import get_cost
from .cost import pears... |
d6d0888a5ac41aa6437af0ad30310493bec3fd1e71da509192b2f89a5ad6dbf2 | Python | 68,900 | 1,371 | # Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
import logging
from collections import OrderedDict
import torch
from .sam3_tracker_base import concat_points, NO_OBJ_SCORE, Sam3TrackerBase
from .sam3_tracker_utils import fill_holes_in_mask_scores
from .utils.sam2_utils import load_video_frame... |
d07447667675f123d7214719359de4d4b9ed0c8b6116ca5238e214d5b60b0a84 | Python | 68,905 | 1,811 | """
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... |
1cc9689cb9a548f555f48d0f20298ffcd31e8d6a50d4f80efaf268f8c4f2fbf5 | Python | 68,944 | 1,928 | """
SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: © 2022 Renaud Bastien, Stephane Sanchez <stephane.sanchez@ut-capitole.fr>
Université Toulouse Capitole - Institut de Recherche en Informatique de Toulouse
Real Expression Artificial Life (REVA) Research Team
https://www.irit.fr/departement/calcul-intensif-simulat... |
8ee1edefe0fada96dcce30e0f41f137b6c903eec807bd6905f397b95502f63a0 | Python | 69,350 | 1,159 | import os
import numpy as np
import pandas as pd
import nibabel as nib
from vtk import vtkPolyDataNormals
from ..mesh.mesh_io import read_surface
from ..mesh.mesh_operations import combine_surfaces
from ..vtk_interface import wrap_vtk, serial_connect
def load_mask(name='midline', surface_name="fsa5", join=False):
... |
079d1f41ca6908dbe1448da1843626490f73785856c7192c1fd4b36223cc2d48 | Python | 69,990 | 1,933 | """Base classes inference models."""
import sys
import logging
from dataclasses import dataclass
from typing import List, Literal, Optional, Tuple, Union
import numpy as np
import tensorflow as tf
from scipy.special import xlogy, logsumexp
from tqdm.auto import tqdm, trange
import osl_dynamics.data.tf as dtf
from os... |
af8ff6e11866dd808ad0117e9332ef2fb3e563fd6d59c5eb04322bec93c38e4c | Python | 70,048 | 2,063 | import functools
from enum import Enum
from typing import (
Any,
Callable,
Dict,
Iterable,
List,
Literal,
NamedTuple,
Optional,
Sequence,
Tuple,
Type,
Union,
get_args,
overload,
)
import torch
import torch.utils._pytree as pytree
from torch import Tensor
import ... |
672903963dc75cb8b2c07d8514daea72f59a3a0fc09cdaeabf2cc6bcdaee1c9c | Python | 70,138 | 1,466 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import contextlib
import math
import weakref
from collections.abc import Callable
from pathlib import Path
from typing import Any
import cv2
import numpy as np
import torch
from PIL import Image, ImageDraw, ImageFo... |
dfc4094d210b8e0ff9191270c53b396aa32688ac69fc098492d64a33d2b8a7fb | Python | 70,192 | 2,317 | import copy
import os
import subprocess
import tempfile
from collections import defaultdict
from itertools import zip_longest
from shutil import rmtree, copy2
import numpy as np
import pandas as pd
import nibabel as nib
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
from nilearn._util... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.