sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
93e4b7152ee9d6fe67339640838df928f4bb7abafa2071b148476845ae3bd323 | Python | 46,351 | 1,206 | ####################################################################################################
# Copyright (c) 2016 - 2024, EPFL / Blue Brain Project
# Author(s): Marwan Abdellah <marwan.abdellah@epfl.ch>
#
# This file is part of NeuroMorphoVis <https://github.com/BlueBrain/NeuroMorphoVis>
#
# This program is fre... |
f17fb1ea4b10c168c293d18df858140bd592e4e5c14ced134b7572280f77cd1c | Python | 46,373 | 1,233 | ####################################################################################################
# Copyright (c) 2016 - 2024, EPFL / Blue Brain Project
# Author(s): Marwan Abdellah <marwan.abdellah@epfl.ch>
#
# This file is part of NeuroMorphoVis <https://github.com/BlueBrain/NeuroMorphoVis>
#
# This program is fre... |
ad6944f14e1f3ba0b7cb131a31a28bc282dcd5c4da08e5d333579fb80d1a94af | Python | 46,396 | 1,210 | """
WeChat channel for OmicVerse Jarvis via Tencent iLink long-polling.
Supports:
- official iLink `getupdates` long-poll for inbound messages
- official iLink `sendmessage` for outbound text and image replies
- image upload via AES-128-ECB + CDN (mirrors @tencent-weixin/openclaw-weixin)
- basic commands: /help /statu... |
02b36fe4676d6c726c944f8bd060fee1b4261a6cb5626c668261886d789f7149 | Python | 46,480 | 1,015 | import numpy as np
from gene import gene
from scipy.stats import ttest_rel, ttest_ind, ranksums
import sys
import csv
import networkx as nx
from scipy.stats import wasserstein_distance
class sergio (object):
def __init__(self,number_genes, number_bins, number_sc, noise_params,\
noise_type, decays, dynamics = ... |
1e2119ea42782c6ddccfc6ae2eb75f7787ac05263df2a62a3aaaddcb68f7e7d6 | Python | 46,481 | 1,015 | import numpy as np
from .gene import gene
from scipy.stats import ttest_rel, ttest_ind, ranksums
import sys
import csv
import networkx as nx
from scipy.stats import wasserstein_distance
class sergio (object):
def __init__(self,number_genes, number_bins, number_sc, noise_params,\
noise_type, decays, dynamics =... |
55e9e23ab01d08e4767492cbfad6b3f4a18fccf9e907f4eedb98e03a25aedc32 | Python | 46,544 | 1,199 | # -*- coding: utf-8 -*-
# (C) Copyright 2026 IBM. All Rights Reserved.
#
# Licensed under the MIT license. See LICENSE file in the project root for details.
# pylint: disable=too-many-instance-attributes, too-many-lines
"""Compound configuration for Analog (Resistive Device) tiles."""
from copy import deepcopy
from... |
1cd1d567e4ad585d97ec4b065c2d515fd878cbd493d4390b82a434b36d81bd07 | Python | 46,606 | 1,225 | # Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
920242bff515d539d8a88f88463133f5f9c4e447793c46e36f369eaa4eed6a58 | Python | 46,729 | 980 | # Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
f14848b7120f9286f94ecf42b5bd021ec0b0d8dd89074b58e4b2fd50360c985f | Python | 46,899 | 970 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
# pylint: disable=line-too-long
# pylint: disable=multiple-statements
# pylint: disable=too-many-lines
# pylint: disable=wrong-import-position
#-------------------------------------------------------------------------------
'''
This program... |
32e89a477a9a7e5c147499f770809f05db6adf1595aa7f6537119fd00c2b59d0 | Python | 46,964 | 1,277 | """Solvers for training, testing, checkpointing and recovering of networks."""
import logging
import time
from dataclasses import dataclass
from typing import Dict, Optional, Protocol, Union
import numpy as np
import torch
from datamate import Directory, Namespace, namespacify
from toolz import valfilter, valmap
from... |
1022bfe5e2951eb07d0490044fa1190023c7a58c5e2de529262011dace69d48f | Python | 47,100 | 699 | from argparse import ArgumentParser
import numpy as np
import time
from pathlib import Path
import os, sys, psutil, gc
# TODO: Remove this later maybe
# import tracemalloc
#
# tracemalloc.start()
if sys.platform == "win32":
import types
m = types.ModuleType("resource")
m.RLIMIT_AS = 0
m.RUSAGE_SELF =... |
ea39c16b3c0e0297df6f68a872f87e6c0db068b8616e1acf3270aabc37e3dba2 | Python | 47,134 | 1,241 | """Get event-related averages per stimulus duration"""
import os
import glob
import nibabel as nb
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
ROOT = '/Users/sebastiandresbach/data/neurovascularCouplingVASO/Nifti'
# Define data dir
DATADIR = '/Users/sebastiandresbach/d... |
046d8be7eb5b5c224a4f2ba1989a5368a9771eaccf6b3cd84ce1429974d858d6 | Python | 47,280 | 970 | __author__ = "Simon Andermatt"
__copyright__ = "Copyright (C) 2017 Simon Andermatt"
import copy
import logging
import os
from os import listdir
from os.path import isfile, isdir, join, splitext
from threading import Thread
import nibabel as nib
import mvloader.nifti as ni
import mvloader.nrrd as nr
import mvloader.di... |
716349d19cdf81fa808b1d35e75d0d1f5862556c5ab730de4299f62e611816ee | Python | 47,311 | 1,260 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import json
from http import HTTPStatus
from time import sleep, time
import pytest
from deepdiff import DeepDiff
from shared.fixtures.data import Container
from shared.fixtures.init import CVAT_DB_DIR, CVAT_ROOT_DIR, container_exec_cvat
from shared... |
ba9a9165e603b94bfd4b3e6dd9b5a596af1151dcaf1a9aca59c4853bf42239c5 | Python | 47,366 | 1,247 | from argparse import ArgumentTypeError
from . import mpi_wrapper as mpi_wrapper
import sys
from matplotlib import cm
from matplotlib.colors import ListedColormap
import numpy as np
import matplotlib.pyplot as plt
import time
from scipy import optimize
from scipy.optimize import minimize
from . import bonsai_globals as ... |
d80fa2f838e720c0794ab9edd09585713db6076296436a255f62fb61556e4b17 | Python | 47,408 | 1,303 | # Copyright (c) 2017-present, Facebook, Inc.
#
# 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... |
4b76ce9ec7c1b581a3902ac04b93850a80920a51b0e5720c148061f2e13e0c75 | Python | 47,440 | 978 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
# pylint: disable=line-too-long
# pylint: disable=multiple-statements
# pylint: disable=too-many-lines
# pylint: disable=wrong-import-position
#-------------------------------------------------------------------------------
'''
This program... |
4480ffc799a294243eb6d03673d5aeceafc66524e33eee584f308f56814e6041 | Python | 47,786 | 965 | import os
import copy
import logging
import datetime
from itertools import product
from collections import defaultdict
from typing import Callable, Dict, List, Tuple, Union
import csv
import h5py
import numpy as np
import pandas as pd
from ml4h.defines import CARDIAC_SURGERY_DATE_FORMAT
from ml4h.normalizer import St... |
fb9f01ae7bff40f2c4072314d5f220fcd380855736f720f4c0900916a298d381 | Python | 47,795 | 819 | import os
import time
try:
print('SlURM_JOB_ID',os.environ["SLURM_JOB_ID"])
except:
print("no slurm id")
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import tensorflow as tf
import tables
import tensorflow.keras as K
import gc
import GenNet.GenN... |
11f0234e5c70c7da3bb22ed0460fd79e2cb5789b908122c425aa93dbc9960750 | Python | 47,850 | 1,097 | #!/usr/bin/env python3
import os
from typing import Union, Tuple
import deepspeed
import numpy as np
import torch
from deepspeed.constants import TORCH_DISTRIBUTED_DEFAULT_PORT
from fire import Fire
from ignite.contrib.handlers import ProgressBar
from ignite.contrib.metrics import GpuInfo
from ignite.handlers.checkpoi... |
baf7484c10f8d4e8cf09963891a74040f44c88ca7921a9cfcb6dac64c98323c8 | Python | 47,887 | 1,240 | """B-cell receptor analysis — wrappers over the Immcantation backends.
These functions thread the B-cell / immunoglobulin-specific tasks behind
``method=``-style dispatchers:
* :func:`clonal_clustering` — B-cell clonal partitioning (:mod:`pyscoper`).
* :func:`mutation_analysis` — observed SHM frequencies (:mod:`pys... |
1fdc68d14472b3c3ef3ee4e245b87f1f391e02f28f98b901bfb3ca9707848777 | Python | 47,953 | 1,441 | """Connectome compiler and visualizer."""
import json
from contextlib import suppress
from dataclasses import dataclass
from importlib import resources
from pathlib import Path
from typing import (
Any,
Callable,
Dict,
Iterable,
List,
Optional,
Protocol,
Tuple,
Type,
Union,
)
i... |
e9ed2f666d48a51de97be2a54eecfb29ad44d248c61bb7220b3054ce8ff822ea | Python | 48,030 | 1,196 | # built-in dependencies
import os
import json
import hashlib
import struct
import base64
import uuid
import math
import functools
import re
from typing import Any, Dict, Optional, List, Set, Tuple, Union
from urllib.parse import urlparse
# project dependencies
from deepface import __version__
from deepface.modules.dat... |
c91917c348202ba487cbe82fce2fbe8b6b0bd7ce7c8b738adae3af045f5b2f0f | Python | 48,048 | 1,402 | from imports import *
import re
from ngs_mapper.samtools import InvalidRegionString
from ngs_mapper.base_caller import VCF_HEAD
# How long you expect each base position on the reference to take to process
EXPECTED_TIME_PER_BASE = 0.0015
# How long you expect for the entire fixtures/base_caller/test.bam to complete
EX... |
6f6451e60f593f2f100d7f9ccea61acb484378fc25f1a7fa9cf78b4c635cd257 | Python | 48,088 | 1,459 | import os
import warnings
warnings.filterwarnings('ignore')
from typing import Callable, Iterable, Optional, List, Union,Dict, Literal
import collections
import logging
import numpy as np
import anndata
#from math import ceil, floor
import torch
from torch import nn as nn
import torch.nn.functional as F
from torch imp... |
22191e6ead4296eda132b0fcebb40b76e65c0d0d675979040777b98b654df9a1 | Python | 48,095 | 748 | import torch as th
from torch.nn import functional as F
import torch.nn as nn
import numpy as np
from torchdiffeq import odeint
from .velocity_field import VelocityFieldReg
from .modules import create_encoder, create_decoder, MLP, GCN
from ..utils import normalize, sparse_mx_to_torch_sparse_tensor, batch_jacobian, ga... |
41ffefb2c34d65fbcbad0b3392c4aa5547aa57ca9834cf909b2bbd9d47a6a1ec | Python | 48,144 | 1,285 | #
# CEBRA: Consistent EmBeddings of high-dimensional Recordings using Auxiliary variables
# © Mackenzie W. Mathis & Steffen Schneider (v0.4.0+)
# Source code:
# https://github.com/AdaptiveMotorControlLab/CEBRA
#
# Please see LICENSE.md for the full license document:
# https://github.com/AdaptiveMotorControlLab/CEBRA/bl... |
9c54b34aa5a21bc42e7350f54464327405922f0140a91e6bfe7e4fe70b6a0f45 | Python | 48,221 | 1,107 | import cv2
import numpy as np
import os
import tensorflow.keras
import tensorflow.keras.layers as L
import tensorflow.keras.backend as B
import random as rnd
import tensorflow.keras.initializers as I
from tensorflow.keras.utils import Sequence as Seq
import tensorflow_addons as tfa
import matplotlib.pyplot as... |
55ab831ac36bba1bd38033ae9d6c66153054293eef814f0f6e32a7ca9fa4e9ec | Python | 48,384 | 1,133 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy2 Experiment Builder (v1.82.01), Thu Jul 14 10:25:47 2016
If you publish work using this script please cite the relevant PsychoPy publications
Peirce, JW (2007) PsychoPy - Psychophysics software in Python. Journal of Neurosci... |
2740b2bf0693f3955a3e14d18d3afb127342b7fb62de663d18794250f6c174da | Python | 48,386 | 1,133 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy2 Experiment Builder (v1.82.01), Thu Jul 14 10:25:47 2016
If you publish work using this script please cite the relevant PsychoPy publications
Peirce, JW (2007) PsychoPy - Psychophysics software in Python. Journal of Neurosci... |
86b20a530afe08d9d1889a4a8d3a817661a366de401ea627dca72fd1fe4c30a2 | Python | 48,504 | 1,107 | """
OmicVerse Smart Agent — thin facade / composer.
This module provides the public ``OmicVerseAgent`` class and the ``Agent()``
factory. All substantial logic now lives in the ``ovagent/`` subpackage;
this file wires the subsystems together and exposes the stable public API.
Usage:
import omicverse as ov
re... |
aefd1ac93bf3e30a413a00c846984e9bfda8fb2dd24e1ee3e0baa0805b7bd695 | Python | 48,535 | 1,041 | # Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
1c17b77b66401d48b9b661580ec23b37ef9d18203cc0947c60ece54135c97e3c | Python | 48,551 | 1,185 | # -------------------------------------------------------------------------------------------------------------------------------------
# Following code curated for Bio-Diffusion (https://github.com/BioinfoMachineLearning/bio-diffusion):
# --------------------------------------------------------------------------------... |
c9b384f70bca2fc8aab7747c2aa645f4b8306bab2735145b3a673fa579dcdd71 | Python | 48,602 | 1,371 | import copy
import os
import secrets
import subprocess
import sys
import tempfile
from pathlib import Path
from typing import Dict
# RayConfig reads the auth mode once at import, so set the mode before importing
# ray. A per-process random token, inherited by subprocesses, lets the cluster
# and this process agree wit... |
cbe88bfc607df2b2ccb976402b422ed75df4ac3ae13872f6d7345d5eb1c8ca0c | Python | 48,644 | 1,107 | r"""Designs over **discrete part choices** — the design space synthetic biology
actually has.
:func:`~omicverse.synbio.doe_design` describes a factor as a continuous range,
``{'promoter': (0.05, 1.0)}``. Almost no real construct is built that way. There
is no continuous promoter dial: there is a plate of characterised... |
e8d93836b70d10ba87cee4cb999f20e48c9b5b8b802bdb462559ead04e6eb1d5 | Python | 48,699 | 975 | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals, absolute_import, division
import warnings
from .config import Config
from .base_model import BaseModel, suppress_without_basedir
from ..utils import _raise, axes_check_and_normalize, axes_dict
from ..utils.six import Path
from ..utils.t... |
8c0ad5c7d8b71db22d72305ad91302b282dcf09900dd8df9cb30bda5f1db70ce | Python | 48,768 | 1,405 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 22 13:22:26 2015
@author: agiovann
"""
from builtins import map
from builtins import zip
from builtins import str
from builtins import range
import cv2
import json
import logging
import matplotlib.pyplot as pl
import matplotlib.patches as mpatches
... |
7502676b7a6dd25b8bba3235846791f6b501dbe3c5e77d23ea886dab9b13e861 | Python | 48,846 | 1,204 | import bpy
import bmesh
import mathutils
import os
import numpy as np
from datetime import datetime
import math
from collections import defaultdict
import time
import re
import datajoint as dj
import csv
#The new way of adding python libraries
import sys
#TODO: Replace this path when setting up
packages_path = "C:\... |
0baa88ea660e3be076b4a9e29ba83cf1e936c67ce0f7bea789f25764d1cfaee0 | Python | 48,914 | 1,440 | # Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
19c59867714a5f61287c0c7d7b15ac2993456d775484508dba2ff0b3d4377b83 | Python | 48,915 | 1,303 | """Classes to work with Hugging Face ecosystem (https://huggingface.co/)
E.g. transformers or tokenizers
This module should be treated as a leaf node in the dependency tree, i.e. no
other skorch modules should depend on these classes or import from here. Even
so, don't import any Hugging Face libraries on the root le... |
74a47659ac6514838eb65930376a0a4d86f11cb657fd0286c18896f38f9c6f1a | Python | 48,941 | 1,184 | import anndata
import pandas as pd
import networkx as nx
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.patches as mpatches
import random
from matplotlib.collections import LineCollection
from matplotlib.patches import FancyArrowPatch
from ._cpdbviz import CellChatViz
def cpdb_exact_target(mean... |
aa9a416e0a87062409521fb7373cf55652fcb007e7c34f017140f45f6934bc78 | Python | 49,014 | 1,343 | r"""
The downanlysis of cellphonedb
"""
from threading import RLock
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import networkx as nx
import matplotlib.patches as mpatches
import scanpy as sc
import matplotlib
import anndata
from .._registry import register_function
kpy_install = False
_cp... |
d4bebc426466495722dca1e199706d7951c917c5629b4b849a7514e04e8425b9 | Python | 49,108 | 1,389 | import asyncio
import hashlib
import logging
import ntpath
import os
import shutil
import sys
import tarfile
import time
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Callable, List, Optional, Tuple
from urllib.parse import urlparse
from zipfile import ZipFile
from filelock import... |
508b9486692094ef9c4527fe6273c5aee80a9d80291af891eeb8d00173cec899 | Python | 49,209 | 1,298 | from tkinter import *
from tkinter import ttk
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg,
NavigationToolbar2Tk)
import numpy as np
from matplotlib import rcParams
import os
def run_GUI():
global CVtkinter
global roo... |
84e3192017b3ae5646f50860fe96d834d77be65536cea83c1654df28dd30bfaa | Python | 49,267 | 1,047 | import pandas as pd
import numpy as np
# import umap.plot
import ssl
import sys
ssl._create_default_https_context = ssl._create_unverified_context
from tqdm import tqdm
from sklearn.mixture import GaussianMixture as gmm
import scipy
from matplotlib import pyplot as plt
import os
from helper_funcs import *
from sklearn... |
65c383157b68db345962e25e141419842d560f52e05571e20356c012456b8e68 | Python | 49,277 | 1,074 | ####################################################################################################
# Copyright (c) 2016 - 2024, EPFL / Blue Brain Project
# Author(s): Marwan Abdellah <marwan.abdellah@epfl.ch>
#
# This file is part of NeuroMorphoVis <https://github.com/BlueBrain/NeuroMorphoVis>
#
# This program is fre... |
e0d58c0d82f417316095f9d9811a202c48c9d4cc971017e06e0a4b042daad504 | Python | 49,302 | 1,188 | import math
from typing import Dict
import numpy as np
import torch
from torch import nn
import torch.nn.functional as F
from torch_scatter import scatter_add, scatter_mean
import utils
class EnVariationalDiffusion(nn.Module):
"""
The E(n) Diffusion Module.
"""
def __init__(
self,
... |
548283270bcf69c33d2fff88965d4e9a87e4dc2a948572a6a4642c4f985d77af | Python | 49,396 | 1,119 | #!/usr/bin/env python3
from __future__ import print_function
import argparse
import glob
import sys
import matplotlib.pyplot as plt
import pysam
import collections
import numpy as np
import os
GENE_GTF_CHROM_IDX=0
GENE_GTF_TYPE_IDX=2
GENE_GTF_START_POS_IDX=3
GENE_GTF_END_POS_IDX=4
GENE_GTF_INFO_IDX=8
GENE_TYPE_GENE="... |
d97d988145ef49c5c021627da540b74c951fb5fa44cc4fd6d160d3f14e43ca58 | Python | 49,470 | 1,163 | import logging
import stanza
import re
import sys
import json
from tqdm import tqdm
from stanza.pipeline.core import DownloadMethod
from agent.data.entities.config import ROOT_LOGGER_ID
from agent.data.sql.sql_mgmt import get_connection, select_fields_where, update_text_field, update_non_text_field
from agent.nlp.met... |
eacd886b04b3bdcc0207d44a0b77e1afddc8866105754498af8546deb533cadf | Python | 49,501 | 1,042 | ####################################################################################################
# Copyright (c) 2016 - 2024, EPFL / Blue Brain Project
# Author(s): Marwan Abdellah <marwan.abdellah@epfl.ch>
#
# This file is part of NeuroMorphoVis <https://github.com/BlueBrain/NeuroMorphoVis>
#
# This program is fre... |
e33b57b78eeee14a0c67533eb2aad9a5a1609550ec72cb8d26659c14ae5b954d | Python | 49,665 | 1,106 | # Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
946a62339be71e3a8a78ca677cc88019c65bab9a8b2a4ac21b2803ac3b8745ae | Python | 49,696 | 599 | import pytest
import re
import random
import time
from collections import Counter
import numpy as np
import networkx as nx
from pyteomics import mass
from candycrunch.analysis import CandyCrumbs, get_fragment_mass, glycan_to_graph_monos, derivatization_sites, DERIVATIZATION_MASSES, \
build_glycopeptide_input, rank_... |
305d046ba1ad5c4a98953a0048065c502e095755e8c9d316046113e422fd41f5 | Python | 49,718 | 1,168 | # coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# 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 ag... |
3af90b75404d2e7ce5ddfee5a4de8b07a0872bdfc49ad48e61e3658b9c89b73e | Python | 49,823 | 1,096 | # Ultralytics YOLO 🚀, GPL-3.0 license
"""
Dataloaders and dataset utils
"""
import contextlib
import glob
import hashlib
import math
import os
import random
import shutil
import time
from itertools import repeat
from multiprocessing.pool import ThreadPool
from pathlib import Path
from threading import Thread
from url... |
b58802c7b73c739a7aa432a9dbb0cb76bfb04280ae1c323fa4a7d16c1914e8d5 | Python | 49,850 | 793 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'config_form.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# 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 QtCore, ... |
d31abda8065a6d6faec26a702455cd24a4a65669b6d25c47556de28d8c16b193 | Python | 49,866 | 1,254 | """
Module defining the STAGG Settings Editor, where the user can
define statistical and graphing settings that will be used in R.
***
built as part of the Russell Ray Lab Breathing And Physiology Analysis Pipeline
***
Breathe Easy - an automated waveform analysis pipeline
Copyright (C) 2022
Savannah Lusk, Andersen ... |
2392130f6634e112af616e9df3bf7c4415e86c72ed39608c17dfa8a0e4d952dd | Python | 49,930 | 1,378 | """Plotting for ``ov.genetics`` — matplotlib visualisations.
Standard statistical-genetics figures: the genome-wide Manhattan plot
(:func:`manhattan`), the Q-Q plot with genomic inflation
(:func:`qqplot`), the LocusZoom-style regional association plot
(:func:`regional_plot`), the colocalization plot (:func:`coloc_plot... |
c7de3fdcd35b368ea642e83ee62c098f2f77e115c2f4cc09b88554db735a0a12 | Python | 50,216 | 1,260 | import time
from collections import defaultdict
from dataclasses import Field, dataclass, field
from enum import Enum
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set
import ray
from ray.data._internal.execution.bundle_queue import create_bundle_queue
from ray.data._internal.execution.interfaces.common... |
8d1aeb48048de6c0fb73339c75ad30ad48514400c256c487a1c68bea44381c46 | Python | 50,236 | 1,298 | import pandas as pd
from sklearn.linear_model import Ridge
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error, root_mean_squared_error, mean_absolute_error, r2_score
import scanpy as sc
import anndata
import matplotlib.pyplot as plt
from sklearn.prepro... |
62bfdd03dd80532abd274a7cd6ac585e59beb5e134273b37bbb351245dde07ff | Python | 50,288 | 1,097 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Constrained Nonnegative Matrix Factorization
The general file class which is used to produce a factorization of the Y matrix being the video
it computes it using all the files inside of cnmf folder.
Its architecture is similar to the one of scikit-learn calling the fu... |
dc6b91bed6cd600c17475e1e5a2691838ab24ddb41cb9bfc57c46f3b9161a42f | Python | 50,324 | 1,386 | # Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
03f640b78a272c341e84e6913627fb1cebf20ca8f485a917a156b013eec2136f | Python | 50,397 | 1,291 | r"""Cell type prioritization via machine-learning cross-validation (Augur).
Pure-Python port of `R Augur <https://github.com/neurorestore/Augur>`_
(Skinnider et al. 2020, *Nature Communications*). Trains a random-forest or
logistic-regression classifier per cell type to predict condition labels,
evaluates AUC in stra... |
596b2ea7c863512287f2dcf6c1ed2488a82528267eefed5c961c0dbb2d72cd2b | Python | 50,422 | 1,078 | '''
Created on Nov 7, 2022
@author: Yanay Rosen
'''
import os
os.environ["OMP_NUM_THREADS"] = "4" # export OMP_NUM_THREADS=4
os.environ["OPENBLAS_NUM_THREADS"] = "4" # export OPENBLAS_NUM_THREADS=4
os.environ["MKL_NUM_THREADS"] = "6" # export MKL_NUM_THREADS=6
os.environ["VECLIB_MAXIMUM_THREADS"] = "4" # export VEC... |
47eb29e5ca5d23adeaa4d19f08a09d76fd3ead37608ec92975236669c570f131 | Python | 50,479 | 844 | import unittest
from collections import OrderedDict
from copy import deepcopy
import numpy as np
from batchgenerators.augmentations.utils import resize_segmentation
from scipy.ndimage import map_coordinates
from skimage.transform import resize
from nnunetv2.preprocessing.resampling.default_resampling import resample_... |
86ee8f5e19349ba4fadccb3e1505919f4a1c790950afd392d01a3e2472da325e | Python | 50,503 | 1,363 | """Joint single-cell TCR + gene-expression analysis — a CoNGA-style layer.
A clean, AnnData-native reimplementation of the core of **CoNGA**
(Schattgen *et al.*, *Nat Biotechnol* 2022; github ``phbradley/conga``):
"Clonotype Neighbor Graph Analysis" couples the gene-expression (GEX)
similarity graph with the TCR-seque... |
fa21891ff359ef18a7360c4b9ca23de1152d09c622e05a9b615f1150c5a18bae | Python | 50,551 | 1,065 | import pdb
import time
from math import sqrt
from typing import Union, Tuple, List, Optional, Dict
import numpy as np
import torch
from torch.nn.functional import (
linear as f_linear,
)
from torch.nn import (
Module as nnModule,
Parameter,
)
from torch import (
Tensor, zeros,
einsum, clamp, nn,... |
0e1944694ccdd83c409d914c708505ca7f34cc208e1dc18afa7430d78f3ec4b0 | Python | 50,649 | 966 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=broad-except
# pylint: disable=invalid-name
# pylint: disable=line-too-long
# pylint: disable=multiple-statements
# pylint: disable=too-many-lines
#-------------------------------------------------------------------------------
'''
This file contains th... |
271c1a961e5771cb6e5b430df036c17cf82c9c6ed697d577fa7048258fcd8411 | Python | 50,666 | 1,236 | # -------------------------------------------------------------------------------------------------------------------------------------
# Following code adapted from GCPNet (https://github.com/BioinfoMachineLearning/GCPNet):
# ---------------------------------------------------------------------------------------------... |
4ec668a66cbab5a9eff8e3bc1ff7460c42d1106ac3ca76a2fcd0032a5f8c9f8c | Python | 50,766 | 859 | # -*- coding: utf-8 -*-
from __future__ import division
##External base packages.
import time
import glob
import os
import gc
import pdb
import sys
##External packages.
import pandas as pd
import numpy as np
import math
from sklearn.impute import SimpleImputer
from glimix_core.lmm import LMM
import dask.array as da
#In... |
9343975b84112d6dc7f304e4211a181f26c4e7710cb817b6e3fd7acef5112470 | Python | 51,237 | 1,292 | """Functions and classes for computing nearest neighbors."""
from __future__ import annotations
import contextlib
from collections.abc import Mapping
from textwrap import indent
from types import MappingProxyType
from typing import TYPE_CHECKING, NamedTuple, TypedDict
from warnings import warn
import numpy as np
imp... |
26920138b34254def1e979d67dfce4a975cbf5d817960c7b2b5df67ff9314b9c | Python | 51,252 | 1,340 | from __future__ import annotations
from dataclasses import dataclass, field
from typing import Optional
import numpy as np
import pandas as pd
import patsy
from scipy import optimize, special, stats
from statsmodels.nonparametric.smoothers_lowess import lowess
@dataclass
class EList:
"""Container for limma ``EL... |
72c6887fc9ab178c2c84a360210c17c0b9f98c2ae87c80685b77988b184b6850 | Python | 51,296 | 1,312 | import json
import logging
import sys
from collections import defaultdict
from threading import Lock
from typing import Dict, List, Optional
import requests
import ray
from ray._common.constants import HEAD_NODE_RESOURCE_NAME, NODE_ID_PREFIX
from ray._common.utils import binary_to_hex, decode, hex_to_binary
from ray.... |
a0ec5b6db028416fd5024983f435c62f095085a8a533ed3b493c76f67a24591d | Python | 51,334 | 1,175 | from typing import Callable, Tuple, List, Iterable, Union
import warnings
import torch
import torch.utils
import numpy as np
import math
import random
import pathlib
import fleetfmt
import scipy
import scipy.stats
from scipy.stats import norm
from scipy.interpolate import interp1d
import sak.signal
import sak.data
imp... |
4946ed917923da4032025462d247f63837824c7a7fbeae72b401369c202f2943 | Python | 51,340 | 1,444 | # Copyright (C) 2019-2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import io
import itertools
from collections import OrderedDict, defaultdict
from collections.abc import Callable, Generator, Sequence
from contextlib import nullcontext
from copy import deepcopy
from enum i... |
6e82a83e1196c28f504d4df9b9334f5082e1beb3ff10924aaa6f957214165d54 | Python | 51,408 | 1,054 | import os
import csv
import numpy as np
import time
import pandas as pd
import itertools
from numpy import ndarray
from random import shuffle
import logging
FORMAT = '%(asctime)s %(funcName)s %(levelname)s %(message)s'
log_level = logging.WARNING
log_level = logging.DEBUG
logging.basicConfig(format=FORMAT,
... |
2a885637be2eb73d320dc149e1813f102ea5a83da2983e1f0f9469ca938065be | Python | 51,416 | 1,244 | from __future__ import annotations
import random
import re
from typing import TYPE_CHECKING, Literal
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from anndata import AnnData
#import patsy
#from inmoose import edgepy
if TYPE_CHECKING:
from collections.abc import Seq... |
70bd2ae80830f6e39f0e5cf0c78a40491a97514dc1c547713098643f5be97dc8 | Python | 51,462 | 1,323 | r"""Plotting for ``ov.flow`` — because gating is a visual procedure.
Every other part of this module can be checked by reading a number. A gate
cannot. "CD3+ is 41.2% of singlets" is not evidence that the CD3 gate is drawn
in the right place; the only thing that settles it is seeing the boundary lying
on the populatio... |
c6fc049f882347cf1a6d3ea8af6e71d74d98644b1bd2777b7023c5b8a33214f6 | Python | 51,645 | 1,195 | import copy
from typing import Any, List, Optional, Tuple, Union
from utils.misc import configure_optimizer, gradient_descent
from einops import rearrange,repeat,reduce
from einops.layers.torch import Rearrange, Reduce
import torch
from torch import nn
import torch.nn.functional as F
import numpy as np
import math
impo... |
0665f08bf709baef5abd0af4d8773150fa64c5462b1de854d556ec25cfc709b0 | Python | 51,699 | 1,386 | # Copyright 2023 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... |
8835dcd7d075b2abb931c54f32e68b3f22c0d951243af6c8944a23ff45e397bb | Python | 51,926 | 1,369 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
import sys
import glob
import shutil
from rdkit import Chem, RDConfig
from rdkit.Chem.rdmolfiles import SDWriter
from rdkit.Chem import AllChem, rdMolAlign
from rdkit.Chem import PandasTools
from rdkit.Chem import rdqueries
from rdkit.Chem import Fragments
fro... |
a6b2131b8ffdcb2f78e911299af1d607de64dd6888061aea4dca98a82cd8502c | Python | 52,123 | 866 | import torch as th
from torch.nn import functional as F
import torch.nn as nn
import numpy as np
from torchdiffeq import odeint, odeint_adjoint
from .velocity_field import VelocityFieldReg
from .modules import create_encoder, MLP, GCN
from ..utils import normalize, sparse_mx_to_torch_sparse_tensor, batch_jacobian, ga... |
9c62242c403bab91dc6ef3a035df5ddb3efc6fddbb489fffe7400a2723d0f45b | Python | 52,432 | 1,603 | import nibabel as nib
import nilearn
import numpy as np
import pandas as pd
from os import path
import subprocess
import sys
import io
import math
import os
import getpass
#Here we import internal nilearn functions, YOLO!
from nilearn._utils.niimg import _safe_get_data
from nilearn.plotting.img_plotting import _get_co... |
6b1a9454ab56b0b6b10964d6189d361e8aa060554ecea931b60164c1287b9a89 | Python | 52,583 | 1,322 | """
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
"""
from __future__ import annotations
import copy
import dataclasses
import enum
import gc
import logging
import math
import os
import random... |
96bf66eeead98a08b65c87a94cb77872d2b6063fe7b9bdead80e5070ded7f8e8 | Python | 52,713 | 1,235 | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from typing import Callable, Tuple, List, Iterator, Optional, Union
import tqdm
from movie_upsampling import batch_compute_interval_overlaps, EMJitterFrame, SharedClockTimeUpsampleTransposeFlat, \
SingleEMJitterFrame
from conv... |
6bd80510ea86b2bb52683bb5b51cbd52bf010060150d931ca6d03a9735cd594f | Python | 52,827 | 1,485 | ####################################################################################################
# Copyright (c) 2016 - 2024, EPFL / Blue Brain Project
# Author(s): Marwan Abdellah <marwan.abdellah@epfl.ch>
#
# This file is part of NeuroMorphoVis <https://github.com/BlueBrain/NeuroMorphoVis>
#
# This program is fre... |
d775fff02083405eccd4646b8e5b075f96af3ae7741a94a95d0e42d3463d6ecc | Python | 52,881 | 1,374 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import itertools
import json
from copy import deepcopy
from datetime import datetime
from http import HTTPStatus
from types import SimpleNamespace
from typing import Any
import pytest
from cvat_sdk import exceptions, models
from cvat_sdk.api_client.... |
08357f7480246e05145839b8a4ce5300dbef27be321403cf6d383b0458f333a7 | Python | 52,914 | 1,238 | import asyncio
import json
import logging
import sys
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
from typing import List, Optional, Tuple
from urllib.parse import urlencode
import aiohttp.web
import ray.dashboard.consts as dashboard_consts
import ray.dashboard.optional_utils as dashboar... |
c8b4944bb4fe9c36b9bef5621e4ed0e91adacf06da5ba3b7204c2eb13f183342 | Python | 52,916 | 1,078 | # Inspired by: https://github.com/haofanwang/ControlNet-for-Diffusers/
import inspect
from typing import Any, Callable, Dict, List, Optional, Union
import numpy as np
import PIL.Image
import torch
import torch.nn.functional as F
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
from diffusers... |
0fb67215f3d2c81274498462dd0ddacc4d8b3e7528adf977541dcb4ff71175e0 | Python | 52,941 | 1,401 | """Bulk immune-repertoire analysis — thin wrappers over :mod:`pyimmunarch`.
These functions cover the bulk AIRR-seq side: diversity, overlap, gene usage,
clonality, public clonotypes and clonotype tracking, computed on the
*immunarch* data model — a list of per-sample repertoire DataFrames plus
sample metadata (the :c... |
dd4d6881e8e92212c2a3613e6af5393ee1e4058b3dcb99e25182c3feae1bb391 | Python | 53,134 | 962 | import tkinter.filedialog as filedialog
import os
from setuptools import glob
import warnings
from setup_functions import *
import tkinter.messagebox as mb
warnings.simplefilter(action='ignore', category=FutureWarning)
pd.options.mode.chained_assignment = 'raise'
def specific_schedule_name(df, schedule_na... |
60bddbb8c8ba58df0cb7f8e66e025499ee28d4c4b086e3dc1b295ded96555c35 | Python | 53,383 | 1,317 | from __future__ import division
import sys
import scipy as s
import numpy as np
import pandas as pd
# from fastdtw import fastdtw
import copy
# import gpytorch
# import torch
# from mofapy2.core.distributions.multi_task_GP import MultitaskGPModel, ELBO, myMultitaskGaussianLikelihood
# from gpytorch.likelihoods import... |
ab85d4f2ff6abd7c14e98bdb0ca564c726d7e45fb9f93c2cf264953c9888a375 | Python | 53,403 | 1,304 | """Tests for the tedana.selection.selection_nodes module."""
import os
import pytest
from tedana.selection import selection_nodes
from tedana.tests.test_selection_utils import sample_selector
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
def test_manual_classify_smoke():
"""Smoke tests for all options ... |
9f8f8e99a1cd958a1ed782b4100fe6f5e8120ffc716af4b5780f392ed46688ab | Python | 53,527 | 1,348 | """
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
"""
from __future__ import annotations
import logging
import os
from dataclasses import dataclass
from typing import TYPE_CHECKING, Literal
i... |
daae3a74e8de32f5e8d1e80528623a546e32e2332f237a6a533546a3106535de | Python | 53,829 | 1,354 | # metrics.py
import json
import os
import time
import logging
import keras
import numpy as np
import tensorflow as tf
from scipy.linalg import sqrtm
import tensorflow.keras.backend as K
from sklearn.metrics import roc_curve, auc, average_precision_score
from tensorflow.keras.applications.inception_v3 import InceptionV... |
60d417a2aac3f215bb3a43b7cfcf23a7726483c9aea214337f4d4c49784acfcb | Python | 54,026 | 1,163 | # common dependencies
import os
import warnings
from typing import (
Any,
Dict,
IO,
List,
Union,
Optional,
Sequence,
Tuple,
cast,
Callable,
TYPE_CHECKING,
)
# this has to be set before importing tensorflow
os.environ["TF_USE_LEGACY_KERAS"] = "1"
# pylint: disable=wrong-impo... |
89e6a03ccccf7d838a13922cf921e9473c1a796fbc8f6c4c3b1282c6c06d7bff | Python | 54,034 | 1,924 |
def get_forbidden():
Forbiddencity={'1': {'num': '1',
'name': '人籁',
'name_en': 'Anthropophony',
'color_rgb': (156, 188, 28),
'color_html': '#9cbc1c'},
'2': {'num': '2',
'name': '青粲',
'name_en': 'Verdigris',
'color_rgb': (196, 220, 76),
'color_html': '#c4dc4c'},
'3': {'num':... |
4a3eb16831dafa54f5df5d0645611c2eec44672cc81a84323b77b9fa3e45e6f3 | Python | 54,299 | 1,311 | import abc
import logging
import pickle
import time
import uuid
from abc import ABC, abstractmethod
from dataclasses import dataclass
from enum import Enum, auto
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Iterator,
List,
Optional,
Tuple,
Union,
)
import ray
from .ref_b... |
e8e1936f5d25fe6e9eec53e80442cc53a1a6b5e5326a33000a90ecccba7f6ce8 | Python | 54,434 | 1,212 | """
pdbfixer.py: Fixes problems in PDB files
This is part of the OpenMM molecular simulation toolkit originating from
Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Portio... |
28cd982007c0febc1835a881b2000fba596b4a1ad222c9412a2733933e4995fc | Python | 54,500 | 1,559 | """Tests for callbacks in training.py"""
from functools import partial
import pickle
from unittest.mock import Mock
from unittest.mock import patch
from unittest.mock import call
from copy import deepcopy
import numpy as np
import pytest
from sklearn.base import clone
from sklearn.model_selection import train_test_sp... |
d8bd6cd4fbc07efb6089f4cb16d43f2c83c8267ef8bc7cb7be985831084558d3 | Python | 54,534 | 1,405 | """Tests for hf.py"""
import difflib
import io
import os
import pickle
import warnings
from contextlib import contextmanager
from copy import deepcopy
from functools import partial
from unittest.mock import Mock
import numpy as np
import pytest
import torch
from sklearn.base import clone
from sklearn.exceptions impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.