sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
f84c321cad42794ac160e1e05c3641e86a155c29f7da8e8b8424ef651aa7a2cc | Python | 61,857 | 1,112 | import matplotlib.pyplot as plt
import numpy as np
import igraph as ig
import networkx as nx
import os
import sys
import seaborn as sns
from scipy import stats
import pandas as pd
from scipy.stats import sem
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler, MinMaxScaler, MaxAbsScal... |
11511dfe7b5b71592c057bbd38c5af1d2c6fe9143477d89f58f46f0fcc61b878 | Python | 62,019 | 1,729 | """The store, and the meaning it has to carry with it."""
import ast
import collections
import dataclasses
import functools
import importlib.util
import inspect
import itertools
import re
import subprocess
import sys
import h5py
import numpy
import pytest
import torch
from beartype.roar import BeartypeCallHintParamVi... |
0d9f329b83b024189342779af3f524700f5fd87cbdd3f97331ef3d28cfa1a490 | Python | 62,044 | 1,360 | """A big ol' module that contains high-efficiency tools for calculating shap scores.
In user code, it's actually not that bad to use this module.
Here's what you do.
1. Create a Generator.
2. Create a Saver.
3. Pass those to an InterpRunner.
4. Call .run() on the Runner.
"""
from typing import Any
from collections.ab... |
045babda2878e4a0eaaaede57b76664177a282ec7699b361c852e29ddeb14b59 | Python | 62,364 | 1,059 | import inspect
import itertools
import multiprocessing
import os
from copy import deepcopy
from queue import Queue
from threading import Thread
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 ba... |
a2476eddb84d5b52d463d82caa00acce5ade8cd82335e17a2c24fc8b78433665 | Python | 62,424 | 1,557 | from __future__ import annotations
import logging
import os
import warnings
from collections.abc import Iterable as IterableClass
from functools import partial
from typing import TYPE_CHECKING
import numpy as np
import pandas as pd
import torch
from anndata import AnnData
from scvi import REGISTRY_KEYS, settings
fro... |
c4775766a78fdeadc7aa365c3fc917f6b771996a139b8ed3e6c84941fa952dc0 | Python | 62,717 | 1,680 | import numpy as np
import pandas as pd
import pytest
import torch
from anndata import AnnData
from mudata import MuData
from scvi.external.diagvi import DIAGVI
# =============================================================================
# Constants and fixtures
# ===================================================... |
ad4267ad19cbce8da8722cb5fa42d9d8a798a7aa0c889f66846e7163426c211e | Python | 62,787 | 1,489 | #!/usr/bin/env python3
import copy
import itertools
from collections.abc import Hashable
from functools import reduce
import networkx as nx
import numpy as np
from opt_einsum import contract
from tqdm.auto import tqdm
from pgmpy import config
from pgmpy.factors import factor_product
from pgmpy.factors.discrete import... |
bdcc1e4b82df77bac6060b9fd278a797c928483021f7e59b3bb1d11f3bd30c33 | Python | 63,185 | 1,527 | import SimpleITK as sitk
import matplotlib.pyplot as plt
import ipywidgets as widgets
from IPython.display import display
import numpy as np
from matplotlib.widgets import RectangleSelector
import matplotlib.patches as patches
import matplotlib.cm as cm
from matplotlib.ticker import MaxNLocator
import copy
class Regi... |
8deebf778b8968e93151f2238750c73f68e88458c4997eb3580fb43cfaaa8bb9 | Python | 63,275 | 1,486 | from PyQt6.QtWidgets import (
QMainWindow, QWidget, QVBoxLayout, QHBoxLayout, QGridLayout,
QPushButton, QLabel, QGraphicsView,
QCheckBox, QScrollArea, QFrame, QComboBox, # ← ここに QComboBox を追加
QDoubleSpinBox, QSpinBox, QToolBox, QSplitter, QGroupBox,
QRadioButton, QButtonGroup, QSlider, QProgressBar... |
cd06ece1e1bc21ad0aa78a3e30be3f0ed6eb676e42f074a5cdc5869c21486818 | Python | 63,278 | 1,471 | import sys
import os
import time
code_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'hippie'))
sys.path.append(code_dir)
# Now import directly from the modules (no 'code.' prefix)
from dataloading import MultiModalEphysDataset, none_safe_collate
from multimodal_model import MultiModalCVAE, Multi... |
d3e880cbd352ed0becbdbb4dec555bdd7a995327361aa74c209defb7fc0eb3d7 | Python | 63,705 | 1,722 | from pathlib import Path
import os
import re
import json
import warnings
from collections import Counter
from itertools import product
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import torch
import torchvision
from sklearn.model_selection import train_test_split
from sklea... |
393a9cc418178b6760323511a28c39b412db57fa46656c4a4138c7a8b856ac9b | Python | 64,053 | 1,716 | import contextlib
import inspect
import io
import os
import pickle
import tarfile
from datetime import datetime
from unittest import mock
import anndata
import numpy as np
import pytest
import scanpy as sc
import scipy.sparse as sp
import torch
from lightning.pytorch.callbacks import LearningRateMonitor
from torch.nn ... |
d081b81cab3230a171975f95064e60e5c930f4fe363fbfea8f1ef98dc36a6ec3 | Python | 64,736 | 1,373 | import hashlib
import tkinter as tk
import tkinter.colorchooser as colorchooser
from tkinter import messagebox, colorchooser, Frame, Canvas
from tkinter import ttk
from src.window_utils import center_window_on_screen
class GraphSettingsContainer(ttk.Frame):
def __init__(self, parent, widgets_to_include=None,
... |
988ccb6033a8df420fec60c6205e9ae51a499d92303ce125c2a588940a43d9af | Python | 65,165 | 1,941 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
b25341c644e79b7e53dce68590603429e3c2fbd6f8c7fa76f7e7c0455f674d4e | Python | 65,173 | 1,941 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
585a82509061da278cd64db721b486b2497a4c44fb80573cde33a606af41f506 | Python | 65,189 | 1,941 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
dabfcb9abb96e62df2faf0070f250b4cb356b4c835f54268504154aece77fedc | Python | 65,189 | 1,941 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
e6e0bdd6a986c15f4c0698435bbb6e14e8c8410b9358b8fe167064b412e0fc70 | Python | 65,196 | 1,942 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
7944ae575426c330fc193c1def8e38570b96871160cfbfd29e6bca9c6fe43dcf | Python | 65,201 | 1,942 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
4e01aafa71063093e27872b103f2fdbabd550d975899b7403b8d5d6168f2242d | Python | 65,205 | 1,942 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
a54ce5ca78a83fd8843ba20fe46da4b5368cf8813044bb267dc3c4c3e96b26bf | Python | 65,219 | 1,942 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
2781789ec0badeb14836c6815657df8c601a768e415ded28ae63153c2eaf08ea | Python | 65,227 | 1,744 | """BRENDA's surface forms, indexed by the entity IDs they name.
Not "what is this entity called" but "which entities could this string be",
which is what distant supervision needs. The index is keyed by the *words* of a
form rather than by the form itself, so no hyphenation convention has to be
modelled. Deliberately ... |
f309151def87bc48af6ba0335528e7f6eecc387c1383e51e3a96c06162cc588c | Python | 65,233 | 1,942 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
8e1b5e3b7a63287d8ad45039448832c4d6ba5b987867c92459bd771d538c0089 | Python | 65,235 | 1,942 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
1d4bc2e6eaa118a8d72d09507cb847350eda26eeb38529dbee20d3fd800d1450 | Python | 65,236 | 1,942 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
cbedff6c60f78cd59e543a21e1ad47aaf53082a25e67ae817a183590bfab391f | Python | 65,260 | 1,943 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
1e91eb8fa77c55695e18b366995150412dc728400da18aa4b58899a15e603b9b | Python | 65,261 | 1,943 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
5ff99e86421b11a622eedeeff2da8695a64deb3b1ee99171e65060bc92d07b8b | Python | 65,429 | 1,946 | ### Functions for fitting ANOVA/ANCOVA models to pd.DataFrames, with inclulded post-hoc comparisons, effect sizes, and bootstrap confidence intervals.
from __future__ import annotations
import warnings
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass, field
from typin... |
d413d1fd6012126fa3a0aee178392ff6a7d0f855c8ec7fda965a7ec52354e538 | Python | 65,658 | 1,637 | import time
from pathlib import Path
import numpy as np
import pandas as pd
from matplotlib.figure import Figure
from tqdm.auto import tqdm
from bombcell.extract_raw_waveforms import manage_data_compression, extract_raw_waveforms
from bombcell.loading_utils import load_ephys_data
# import matplotlib.pyplot as plt
im... |
1303ea2e179eff4679d63556f81d85233646aeff499db9d1266686adac8abaed | Python | 66,492 | 1,443 | """Provides a set of classes and functions to perform CWM-scanning.
While there is very little shared code, the algorithm is taken from the
original BPNet repository, which is released under an MIT-style license.
You can find a copy it ``etc/bpnet_license.txt``.
"""
# In brief, a summary of these classes and function... |
fd11eb0ee6d5e250ea09066d0669ac9a8349d165ec5002c163faba8bb0380b2b | Python | 66,642 | 1,745 | import sys
import os
import re
from PyQt6.QtWidgets import (
QApplication,
QMainWindow,
QFileDialog,
QGraphicsView,
QGraphicsScene,
QGraphicsPixmapItem,
QGraphicsPathItem,
QGraphicsRectItem
)
from PyQt6.QtGui import (
QImage,
QPixmap,
QColor,
QPainter... |
37e4cc71f99215aa7271dc4c0acb714fb3569f8bc162ffe61d0b8d91af87326d | Python | 66,710 | 1,622 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Train a network across multiple GPUs.
"""
import contextlib
import logging
import os
import sys
import time
from argparse import Namespac... |
2645ac23645946db3944af4af85c5cdcd15a46b0918c8f5225dd578728cdd175 | Python | 67,075 | 1,744 | import bigstream.transform as bst
import cv2
import numpy as np
import SimpleITK as sitk
import bigstream.utility as ut
import logging
from bigstream.configure_irm import configure_irm
from bigstream.metrics import patch_mutual_information
from bigstream.metrics import local_correlation_coefficient
from bigstream impo... |
3e9c74d3d51ca9b9f728de47f8e8b0ef1ddbbd4aad60349252fc2ab85778b664 | Python | 67,526 | 1,254 | from typing import Union
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.cm import datad
from pathlib import Path
import json
from GMXMMPBSA.analyzer.style import *
def flatten_dict(d, parent_key=None):
if parent_key is None:
parent_key = []
items = []
for k, v in d.items():
... |
1481555e8d29041636853c99cc11534bd52b7a39df52815c21f5d64e43d9638a | Python | 67,692 | 1,359 | # Copyright (C) 2020 Kristoffer Enoe Johansson <kristoffer.johansson@bio.ku.dk>
"""Module for data handling in the PRISM project
This module implments classes for parsing (PrismParser) and handling
(PrismData derived classes) of data files.
In general, calling PrismParser.read(filename) will return a data object of... |
bcb4d0e3521020de29bc0ab109b5a9f60a9de91d2ccee6387f481fbd6afed71f | Python | 67,776 | 1,254 | 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... |
4e12225cb790d8abc76a2fb615ae1f529826a65caa9593a5dfda0fcbb46d916d | Python | 68,431 | 1,087 | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
381e9bb7c881fbd3c0859264e3613795d3e6a5af7c0a86d0625153f72278d83a | Python | 68,449 | 1,092 | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
68c193655fb7843d302d3c97691cf1431b2cb5c6edf8512269a75a782763d8ec | Python | 68,457 | 1,844 | #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import mat... |
0c7a70d06f247fa18390f483140c9fa9610ae8b9946dd7a6b21cf0aee1593762 | Python | 68,510 | 1,789 | import collections
import gzip
import hashlib
import glob
import logging
import logging.config as logging_config
import os
import re
import shutil
import tempfile
from collections import defaultdict
from contextlib import contextmanager
import numpy as np
import pkg_resources
from numpy.lib.format import open_memmap
im... |
7f9828709177bc2c59c65217d9299b3509138ea0d9bdb75006912e05f4375f7a | Python | 68,973 | 1,774 | from collections import deque
from collections.abc import Hashable, Iterable
from itertools import combinations
from typing import Any
import networkx as nx
import pandas as pd
from pgmpy.base._algorithms import _GraphAlgorithms
from pgmpy.base._mixin_roles import _GraphRolesMixin
from pgmpy.base._plotting import _Gr... |
70fac380384b2de0198a26df2374fe4836a48018ddd30615e229f6f854409707 | Python | 69,635 | 1,790 | #!/usr/bin/env python3
from __future__ import annotations
import itertools
from collections import defaultdict
from collections.abc import Hashable, Iterable
from functools import reduce
from operator import mul
from typing import (
Any,
)
import networkx as nx
import numpy as np
import pandas as pd
from joblib i... |
867fcaddcd38e95aeb4d7b9700f66012db8e1101755b6ac10b39a67c4c2cb0bb | Python | 69,914 | 1,572 | """Lots of helpful utilities for working with models."""
from collections import deque
import multiprocessing
import multiprocessing.synchronize
import subprocess as sp
import typing
import queue
from collections.abc import Iterable
import h5py
import scipy
import pyBigWig
import pysam
import numpy as np
from bpreveal ... |
c3c6b9f06bd5f0abd1f07e9cc99c85c03885a7b75934cc368abc96c32ef4aa53 | Python | 70,069 | 1,790 | import warnings
from copy import copy, deepcopy
import numbers
import matplotlib.font_manager
import nibabel
import numpy as np
import yaml
import mdt
import mdt.visualization.layouts
from mdt.lib.nifti import load_nifti, NiftiInfoDecorated
from mdt.visualization.dict_conversion import StringConversion, \
SimpleCl... |
d2203c6190ed82758e94e970ddc95a4965a78aae05e5683dcb0084e897eccd6b | Python | 70,342 | 1,526 | import torch
import torch.nn as nn
import torch.nn.functional as F
from dropblock import DropBlock2D, LinearScheduler
from modelR.layers.convolutions import Convolutional, Deformable_Convolutional
from modelR.layers.shuffle_blocks import Shuffle_new, Shuffle_Cond_RFA, Shuffle_new_s
import config.cfg_lodet as cfg
... |
5b8264e90c95c593e59c7e738541cab3f357f0917e3d07a14e9a4393ab49b8a1 | Python | 70,579 | 1,950 | import time
from typing import Set
import joblib
import pytest
from rnalysis.gui.gui_widgets import *
from rnalysis.utils import io
LEFT_CLICK = QtCore.Qt.MouseButton.LeftButton
RIGHT_CLICK = QtCore.Qt.MouseButton.RightButton
def widget_setup(qtbot, widget_class, *args, **kwargs):
widget = widget_class(*args, ... |
9c46d290f065b0dd56c07bba3fb0636713fcd1ddeb345f5e17054237dc6c31af | Python | 70,604 | 1,667 | """`ETEBrendaModel` — entity-class detection + relation extraction."""
import functools
import itertools
import logging
from collections import defaultdict
from collections.abc import Mapping, Sequence
from typing import TYPE_CHECKING, NamedTuple
import numpy as np
import torch
from d3text import tracking
from d3text... |
46230456599f76d008fb63eba30ce84647e9c447a2259cb3e8eaa60266bef00f | Python | 70,875 | 1,794 | from __future__ import annotations
import logging
import os
import subprocess
import sys
from pathlib import Path
from typing import cast
import numpy as np
import pandas as pd
from matplotlib.axes import Axes
from matplotlib.figure import Figure
from matplotlib.lines import Line2D
from PySide6.QtCore import Qt, QThr... |
fb8f04006b687d640062b54ff5efba94385db46b48de381a06e5e85ac44fbeab | Python | 71,381 | 1,363 | import torch
import numpy as np
from .math import fft, ifft, conv_fft, wrap_phase, sc_dft_2d, sc_idft_2d, compute_scasm_transfer_function
import torch.nn.functional as Func
from .light import Light
def compute_pad_width(field, linear):
"""
Compute the pad width of an array for FFT-based convolution
Args:
... |
69cbb493753dff9613d76eeec68a2b52837c6ddcdd9a47abea8c7c64db1f25c4 | Python | 71,626 | 1,556 | import abc
import contextvars
import functools
import importlib.util
import itertools
import warnings
from typing import Callable, List, Set, Tuple, Union
import joblib
import lazy_loader as lazy
import matplotlib.pyplot as plt
import numpy as np
import pairwisedist as pwdist
import polars as pl
import polars.selector... |
f54cb393900b034e0419f118ad1a750800fde777d0f362e71cbfb2959066533f | Python | 71,846 | 1,383 | 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 Tuple, Union, List
import numpy as np
import torch
from batchgenerators.dataloading.multi_threaded_augmenter import MultiThrea... |
175ea18610d8d67372227228124296f950026c323ba2c8c34b7aa8ce74bcc981 | Python | 72,172 | 1,815 |
from __future__ import annotations
import argparse
import itertools
import json
import math
import re
import sys
from collections import Counter
from pathlib import Path
from typing import Any, Optional, Sequence
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
import pand... |
c0a94725c89942476c39a2c742f930ce1a21d3f30f02588676580c82af7a851c | Python | 72,215 | 2,296 | from __future__ import annotations
import csv
import json
import re
import shutil
import tempfile
from pathlib import Path
from subprocess import CalledProcessError
from typing import TYPE_CHECKING
from typing import Any
import pytest
from build import BuildBackendException
from build import ProjectBuilder
from cle... |
86c2ca005fa74899178e4fc1a892ad49c32d67e658b9a3aa6d513553d248de87 | Python | 72,345 | 1,134 | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
e4a08b838644238b764df341ba0424a7849cc2196950563c8500805f48bac339 | Python | 72,346 | 1,135 | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
45d7855e94b31732b8f8406647d012150871369230e6ea912791ff11a5978f6a | Python | 72,455 | 1,605 | #!/usr/bin/env python3
import pytest
from skbase.utils.dependencies import _check_soft_dependencies
from pgmpy.base import ADMG, DAG, MAG, PDAG
from pgmpy.base._base import _CoreGraph
def sample_graph1(edge_type=None):
"""
Sample graph for testing node searching(`get_*`) method of `_CoreGraph` class.
Te... |
b338b0c165e96c0d923e61d09bdaf90ed560c0e97018fca2f98b5dc1c1e36982 | Python | 72,775 | 1,886 | import os
import math
import gc
import ast
import re
from contextlib import contextmanager
from itertools import combinations
# ===== Third-Party Libraries =====
import numpy as np
import pandas as pd
from scipy.stats import norm
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import r2_score, ... |
71b579fd25441e185209ab90b805e6833985a03e8c17c1d7ad2a2f317e86a969 | Python | 73,053 | 1,693 | import torch
import os
import numpy as np
import matplotlib.pyplot as plt
from itertools import chain
from tqdm import tqdm
from torch.utils.data import DataLoader
from scipy.ndimage import laplace, gaussian_filter
from .networks import ReluNet, SirenNet, DecomNet, AffineLayer, AttentionSirenNet, SnakeNet, SineplusN... |
da940e3b9712722e0eb41e6a62a80981b672ad936a8d7747ddccd9ac66bdf228 | Python | 73,566 | 1,915 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import contextlib
import json
import logging
import os
import random
import sys
import tempfile
import unittest
from packaging import version
... |
e6495bcadf48b7d3d08d2195da74c662bfdf5afa6d37d18c607101fe5936d73e | Python | 73,572 | 1,421 | # ##############################################################################
# GPLv3 LICENSE INFO #
# #
# Copyright (C) 2020 Mario S. Valdés-Tresanco and Mario E. Valdés-Tresanco ... |
e1c3686560dbe0881c2475f0a7d5d632bf181e9e144f7c4dd956957e01f47f48 | Python | 73,978 | 2,037 | from __future__ import annotations
import itertools
from collections.abc import Hashable, Iterable, Sequence
from os import PathLike
import networkx as nx
import numpy as np
import pandas as pd
from pgmpy import logger
from pgmpy.base._mixin_roles import _GraphRolesMixin
from pgmpy.ci_tests import BaseCITest, get_ci... |
dfad79e4f3c68db8b03bbca61a1e922f0d1f81ee0d9d3431ce8b01436098451d | Python | 74,156 | 2,193 | # Copyright 2021 DeepMind Technologies Limited
#
# 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 agr... |
d2e6f646dff0cf0aae192bcd0f351c3903266e48ead0cfe4e4c65e055937a0b3 | Python | 74,193 | 1,927 | import warnings
from collections import OrderedDict
from collections.abc import Callable, Iterable
from inspect import signature
from typing import Any, Literal
import lightning.pytorch as pl
import numpy as np
import pyro
import torch
import torchmetrics.functional as tmf
from lightning.pytorch.strategies.ddp import ... |
8d45cf139802141ae8988f7334c1411fad368c6f1a3dd415850706b5a5085584 | Python | 74,882 | 1,780 | from __future__ import annotations
import copy
import logging
import os
import re
from datetime import datetime, timedelta
from typing import ClassVar
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from PySide6.QtWidgets import (
QApplication,
QColorDialog,
QFileDialog,
QFrame,... |
5a65e1a0f4e1e2e0793abff201485f774108b0729e84eae4f61a695f12c23c53 | Python | 74,929 | 1,644 | # -*- coding: utf-8 -*-
"""
Layers to construct recurrent networks. Recurrent layers can be used similarly
to feed-forward layers except that the input shape is expected to be
``(batch_size, sequence_length, num_inputs)``. The CustomRecurrentLayer can
also support more than one "feature" dimension (e.g. using convolu... |
579af5cc50f1a14f89096e0d028427715d77ceac4b8cace349513e052e29b527 | Python | 75,849 | 3,002 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
03_fetch_uniprot_classify_and_analyze.py
目标类别分析的最后一步。
本脚本会完成以下工作:
1. 读取第二步生成的 RCSB 靶链注释;
2. 提取并去重 UniProt accession;
3. 通过 UniProt REST API 分批查询蛋白名称、长度、分子量、EC号、
功能、催化活性、亚细胞定位、跨膜区、关键词、蛋白家族和GO注释;
4. 对疑似GPCR条目使用GPCRdb官方REST接口进行二次确认;
5. 将每个PDBbind复合物分类为:
GPCR、Ion c... |
48c2ec288b47ed401133be3f70a891d1c4b96a05a8d445b5f01b8ec71d3c1976 | Python | 75,899 | 1,499 | import matplotlib.pyplot as plt
import numpy as np
import igraph as ig
import networkx as nx
import os
import sys
sys.path.append('..\\src\\')
from read_graph import read_graph
from utils import get_category_indices, format_plot, add_significance, add_group_significance
abspath = os.path.abspath(__file__)
dname = os.... |
3933f1ecf3852ee6fc1c273dc459c5956dc0ea4e5c5299396e96cbea9bdeacb3 | Python | 76,494 | 2,098 | from ..globals import CurrentConfig, RenderType, ThemeType
from ..options.series_options import (
BasicOpts,
AnimationOpts,
AreaStyleOpts,
ItemStyleOpts,
JSFunc,
LabelOpts,
LineStyleOpts,
Numeric,
MinorTickOpts,
MinorSplitLineOpts,
Optional,
Sequence,
Sp... |
ed1bea9017063e48b6186580eb18db915a7e6d51899db8f2c3a81727fb8a2c56 | Python | 77,420 | 1,668 | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... |
e6407575f517d8ca0f5eeb0366e8db90e6e349815ded0e4ed4743b804b18be8d | Python | 77,421 | 1,669 | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... |
c966a9611579a4225982884e5471ad9958f9dc9e03b3ec9187c81adb27e19576 | Python | 77,448 | 2,135 | import os
import time
import math
import networkx as nx
import numpy as np
import tensorboardX
import torch.nn
from matplotlib import pyplot as plt
from sklearn import svm, linear_model
from sklearn.ensemble import AdaBoostRegressor, RandomForestRegressor
from sklearn.ensemble import RandomForestClassifier, AdaBoostCl... |
c796ded520dd3fe5f9816dfc59f327287327b3b2adf36ffaed0cf1ee57a6c353 | Python | 77,822 | 2,014 | import pdb
import sys
import math
import torch
import numpy as np
import os
import torch
import torch.nn as nn
from torch.utils.data import DataLoader, Dataset
import torch.nn.functional as F
from torch.utils.tensorboard import SummaryWriter
from sklearn.metrics import roc_auc_score
import random
import pickle
import ... |
c1bbe5c8f555854fb02018090bd0813713890e386a8792345dadf236584de763 | Python | 78,335 | 1,988 | import os
import shutil
import subprocess
import numpy as np
import pandas as pd
from scipy import stats
from nilearn import image
from tempfile import NamedTemporaryFile, TemporaryDirectory
from urllib.request import urlopen
import matplotlib.font_manager as fm
from matplotlib import pyplot as plt
from PIL import Imag... |
6fd6d1acc043cd75fe001d99b6ab53675252d17c1c88d568247c0f136de6034f | Python | 78,651 | 1,138 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainUIApp.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import ... |
8fe7449cdbfde8fe7f42395b71d02bd406bfdabf6a37bf094f31f4d54e1b87e7 | Python | 79,229 | 2,133 | import unittest
import numpy as np
import numpy.testing as np_test
import pandas as pd
import pgmpy.tests.help_functions as hf
from pgmpy.factors.discrete import TabularCPD
from pgmpy.inference import CausalInference, DBNInference, VariableElimination
from pgmpy.models import DiscreteBayesianNetwork
from pgmpy.models... |
418ff57f00d9fd06ff1af4df074f89c7ce23056e8a077e6e43ce746a63201eb1 | Python | 79,482 | 2,024 | import os
import unittest
import networkx as nx
import numpy as np
import numpy.testing as np_test
import pandas as pd
import pytest
import pgmpy.tests.help_functions as hf
from pgmpy.base import DAG
from pgmpy.example_models import load_model
from pgmpy.factors.discrete import (
DiscreteFactor,
JointProbabil... |
2fc03578932870ac17cf62a9a6b6775ca350841953fa992d95b512e0c018503f | Python | 82,412 | 2,204 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
9da3a14751926100fc40608b265c0dbb694a3bd86186ab51c40a147a575ca53b | Python | 82,757 | 2,016 | from __future__ import annotations
import inspect
import logging
import os
import sys
import warnings
from abc import ABCMeta, abstractmethod
from datetime import datetime
from io import StringIO
from typing import TYPE_CHECKING
from uuid import uuid4
import h5py
import numpy as np
import pandas as pd
import pyro
imp... |
d2261c648c1268defb62b6325d7f6014c768926782b70d7acd851732f201c25a | Python | 83,598 | 1,785 | import sys
import os
import time
code_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'hippie'))
sys.path.append(code_dir)
# Now import directly from the modules (no 'code.' prefix)
from dataloading import MultiModalEphysDataset, none_safe_collate
from multimodal_model import MultiModalCVAE, Multi... |
1a1ac2fc0b77258786c97a78eb46d1c99aaf94fa97cb24888454e4b38d9f8cbb | Python | 83,599 | 1,633 | import sys
sys.path.append("..")
from modelR.backbones.mobilenetv2 import MobilenetV2
from modelR.necks.conv_csa_drf_fpn_hbb import Conv_CSA_DRF_FPN,FC_CSA_DRF_FPN,Cat_Conv_CSA_DRF_FPN,M_CSA_DRF_FPN
from modelR.head.dsc_head_hbb import Ordinary_Head
from modelR.loss.loss_hbb import Loss_s_l,Loss
import config.cfg_lode... |
7f61eeec0f9caf6e8ad7b7a1a9049b4784e9b5fec7a5f125ccc75858d97ca6db | Python | 84,357 | 1,710 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the L... |
684c1037812de6e12ac154389fd873187fba4c2535b0079c8b9a00c701e2e826 | Python | 84,397 | 1,708 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the L... |
a3e1796f017a8eed54ae7b85ab011e881b2d19d8d1b61c08717ce15c879cc8bc | Python | 86,084 | 1,692 | """
Build working AMBER topology/coordinate files from native AMBER inputs.
"""
# ##############################################################################
# GPLv3 LICENSE INFO #
# ... |
f954488600016c36095a208f887ae58c3e82625a91b18e5e03161a4123d81568 | Python | 86,654 | 2,083 | from __future__ import annotations
import logging
import os
import warnings
from typing import TYPE_CHECKING
import numpy as np
import pandas as pd
import torch
import xarray as xr
from torch.distributions import Independent
from tqdm import tqdm
from scvi import REGISTRY_KEYS, settings
from scvi.data import AnnData... |
765283b9be79fb291ff961b7762ae7e5f003fb671c33ac15017c17686357eb36 | Python | 86,850 | 1,825 | # coding=utf-8
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
278917c04e2edb5bb445f11c0a63f766a1bf99fbdaadee1e60692aef9e15f1ec | Python | 86,913 | 1,829 | # coding=utf-8
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
b6ca9057bb3a34a62dd23bed627d91f467727dfe6faa25b3c39550e89ee8f04a | Python | 87,186 | 1,852 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... |
01fdeaf8869a01cb7349e96f3633d82bc531cfcc0ca60aad4f75acdc7449072c | Python | 87,799 | 1,848 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... |
37e9b3ff429c90b75058205e849a8ed0cd7697e1825fe49fc5559ddc00096b01 | Python | 88,186 | 1,987 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... |
6c43052ad95ef02846dfec9a34513b910baf17ca1fd577b23c68e1e2daa66ebc | Python | 89,407 | 1,955 | # -*- coding: utf-8 -*-
"""Realtime Streamlit UI for rotated multi-slice 2D LBM extraction.
This script keeps the original taichi_extraction_lbm.py left-to-right methane
injection convention, while adding rotated-slice loading, multi-slice execution,
plateau diagnosis, and export utilities. It does not modify or overw... |
4ad856822aaca74283fd51fab90aa66977ebfa17c2ce78b19995e7a3c38025b3 | Python | 89,838 | 2,081 | import abc
import collections
import concurrent.futures
import itertools
import logging
import warnings
from functools import lru_cache
from pathlib import Path
from typing import Collection, Dict, Iterable, List, Literal, Set, Tuple, Union
import joblib
import matplotlib.patches as mpatches
import matplotlib.pyplot a... |
98e400c260276698e544d982e6d4f6c8994f36bcd898eb4137d08555886956d4 | Python | 91,726 | 2,709 | import gzip
import platform
from unittest.mock import Mock
import polars as pl
import pytest
import yaml
from polars.testing import assert_frame_equal
from rnalysis import __version__, fastq
from rnalysis.exceptions import InvalidTypeError, InvalidValueError
from rnalysis.fastq import *
from rnalysis.utils import io
... |
e01afdba96187b2d504b4de96b36d278e2861a1f68b2c9808832ba1061a57f45 | Python | 91,809 | 2,596 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
c56792320c6f9e8cc3b85fef45fd2ce1286d454dce7146e029ffba20e05c0c12 | Python | 92,240 | 2,443 | import ast
import collections
import functools
import inspect
import json
import threading
from decimal import Decimal
from functools import lru_cache
from pathlib import Path
from queue import Queue
from typing import Callable, Dict, Iterable, List, Literal, Sequence, Tuple, Union
import matplotlib
import matplotlib.... |
c13d54bacc11d1d976bf616e8cc0cbef33fe47d6c58bab51c5b80da9c9062655 | Python | 95,153 | 1,774 | """
This is a module that contains the class of the main gmx_MMPBSA
Application.
"""
# Import system modules
# ##############################################################################
# GPLv3 LICENSE INFO #
# ... |
65172a7c3a7700c6afb46b94b70797b4d3dc5dff75d7182b869bd4379350b647 | Python | 95,435 | 2,592 | import copy
from collections import namedtuple
from copy import deepcopy
import matplotlib
import pytest
from polars.testing import assert_frame_equal
from rnalysis import filtering
from rnalysis.exceptions import InvalidValueError, RNAlysisInputError
from rnalysis.utils import enrichment_runner
from rnalysis.utils.e... |
1a1f7ea95152e13fc3d12b4e26f51329290b591289524263b54de5261e3a8bd0 | Python | 95,607 | 2,028 | """
:author:
:contact:
:email:
:organization:
:address:
:copyright:
:date: May 14 2025 16:58
:dragonflyVersion: 2024.1.0.1619
:UUID: b5009586310b11f08b905cb26d1a4a9a
"""
__version__ = '1.0.2'
"""
:author:
:contact:
:email:
:organization:
:address:
:copyright:
:date: May 14 202... |
53e7178150f5fae459ea86b6116097ff2d1c16a4328ac4a7f1c0aaa06df8ce5f | Python | 96,386 | 2,478 | """Three-way distant-supervision targets, one per encoded token.
An entity type where a token matches a surface form of an entity in this
document's gold set; `IGNORE_INDEX` where it matches a form of some other
entity, or a pattern match that carries no entity ID at all; `OUTSIDE` where
it matches neither. See the di... |
019929798cc423eae5a37c5d0e5ea56ecb526059ba404dd14bf2bcbf1615fd52 | Python | 97,952 | 2,688 | """The synonym -> entity-ID index, and the two forms that must not be in it.
Everything here runs off ``brenda_references/tests/test_files/testdb.json``,
which is tracked, 40 kB, and carries the same four-table shape as the 1.1 GB
``documents.json`` the pipeline actually reads — including, usefully, `More`
as a synony... |
d0396f92c20b6505e9966ba55612c92fd64067ea98fa5d69d2523054da844340 | Python | 98,468 | 3,162 | from __future__ import annotations
import json
from collections.abc import Callable
from typing import TYPE_CHECKING
from typing import Any
from typing import TypeVar
from typing import cast
import pytest
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.core.packages.dependency_group import ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.