sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
24002aabdaff0b19d4f7e8dcfddfe14dbdde72dd97d531a5996c6f16c45c4ccf | Python | 67,345 | 1,109 | """Evaluation harness: every test set of test_CandyCrunch.TEST_DICTS plus held-out runs (by default the GlycoGauntlet private files), in parallel, with
content-addressed caches for the expensive pure steps and a trace of where each missed ground-truth peak was lost.
Usage (from the repo root):
python tests/harness... |
e6d840e4b0abcd0b4fbf6f24b23cf9df105acb31430971e34030f141da9941a4 | Python | 67,527 | 1,445 | """
wild mixture of
https://github.com/lucidrains/denoising-diffusion-pytorch/blob/7706bdfc6f527f58d33f84b7b522e61e6e3164b3/denoising_diffusion_pytorch/denoising_diffusion_pytorch.py
https://github.com/openai/improved-diffusion/blob/e94489283bb876ac1477d5dd7709bbbd2d9902ce/improved_diffusion/gaussian_diffusion.py
https... |
5d5bee4832f6e8e934a7e05afeb96bac000e6cdcb89a66e523732e2f7f3d7881 | Python | 67,539 | 1,599 | """
Geneformer in silico perturber.
**Usage:**
.. code-block :: python
>>> from geneformer import InSilicoPerturber
>>> isp = InSilicoPerturber(perturb_type="delete",
... perturb_rank_shift=None,
... genes_to_perturb="all",
... ... |
e9c7e8f3eb436245c7851fc354d6de601985e0be50dcbd0023a87447f5b2873b | Python | 67,942 | 1,574 | import copy
import logging
import math
import operator
import os
import queue
import subprocess
import threading
import time
from collections import Counter, defaultdict, namedtuple
from dataclasses import dataclass, field
from enum import Enum
from typing import Any, Callable, Dict, FrozenSet, List, Optional, Set, Tup... |
629337f4c32e649562d34ba71d0c5a5c5a61983c4893b284ebd39c5c4d62fb39 | Python | 68,020 | 1,812 | """
Telegram bot handlers for OmicVerse Jarvis.
Architecture (OpenClaw-inspired):
• handle_analysis() immediately acknowledges and spawns a background asyncio.Task
• The background task streams LLM tokens by editing a single "thinking" message
• Progress (code execution) is sent as separate messages
• On compl... |
a35c44772e20d659f4c110a4bdd9372390c4d31b9ace5c3363871d5376e4336c | Python | 68,117 | 1,845 | # Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
(... |
9c655817d4917bc71794b71205a46766be0416a02e3051ecc1bce59d2a2f8d14 | Python | 68,299 | 915 | """Automatic ground-truth audit of a CandyCrunch test set against the LC-MS/MS run it describes
Usage (from the repo root, in the CandyCrunch environment):
python tests/audit_gt.py <spectra file> <source GT csv> --glycan_class N [--run NAME] [--modification reduced] [--mass_tag 0]
[--s... |
4a823e73c18236d9f98b3ef9bb3d189e8626fcbab7e6d22febbec2d0b594c25a | Python | 68,404 | 1,914 | """
Visualization functions for monocle2_py.
Faithfully reproduces Monocle2's ggplot2-based plots using matplotlib.
Axes styling follows the active matplotlib style.
"""
import colorsys
import warnings
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
import m... |
24422016b54a084dd07aa8705ff81786d2377f2d1de0f344e90758f208c5d7de | Python | 68,418 | 829 | import os
import psutil
import sys
import mozaik
from mozaik.visualization.plotting import *
from mozaik.analysis.technical import NeuronAnnotationsToPerNeuronValues
from mozaik.analysis.analysis import *
from mozaik.analysis.vision import *
from mozaik.storage.queries import *
from mozaik.storage.datastore import Pick... |
ced5ed1a2f73a1ce614b3cbe920f3c6789a59969d9c69f6b0bf61b1fede8641d | Python | 68,496 | 829 | import os
import psutil
import sys
import mozaik
from mozaik.visualization.plotting import *
from mozaik.analysis.technical import NeuronAnnotationsToPerNeuronValues
from mozaik.analysis.analysis import *
from mozaik.analysis.vision import *
from mozaik.storage.queries import *
from mozaik.storage.datastore import Pick... |
7688d369fa62a84f77c10901334158f6460de83267aa3b53113856e60ce07b9f | Python | 68,720 | 2,127 | # 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, ... |
418b2fb3166f616b6f3a2495048588823f3fed5497df18de118247257de0d375 | Python | 68,807 | 1,965 | # coding: utf-8
import logging
import os
import socket
import sys
import time
from typing import List, Optional, Tuple
import pytest
import torch
import ray
import ray.cluster_utils
import ray.experimental.collective as collective
from ray._private.test_utils import (
get_log_message,
init_log_pubsub,
)
from ... |
0d494e1948866f401ea1c6db40ea634a063f0a2ce52b7a2e7812b402a7100b14 | Python | 69,031 | 1,589 | import scipy.io
import urllib.request
import dgl
from dgl.ops import edge_softmax
import math
import numpy as np
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import dgl.function as fn
from torch.utils import data
import pandas as pd
from sklearn.metrics import accuracy_score, f1_sc... |
77b931d69111cdfe14fb304fdac3583130d8e82b8aef4b254bbd25c5dc8b52e1 | Python | 69,146 | 1,789 | # -------------------------------------------------------------------------------------------------------------------------------------
# Following code curated for Bio-Diffusion (https://github.com/BioinfoMachineLearning/bio-diffusion):
# --------------------------------------------------------------------------------... |
c6e1eb0eb1a3f7db4899d2b6a04d03b90e0d64ce1789dd258cbb0d28bb31e9ff | Python | 69,311 | 2,295 | import numpy as np
import pandas as pd
from .._registry import register_function
test_color=[
"#264653", "#2A9D8F", "#8AB17D", "#B5E48C", "#1D3557", "#457B9D",
"#6D597A", "#B56576", "#E56B6F", "#6930C3", "#A06CD5", "#DEC9E9",
"#588157", "#3D5A80", "#98C1D9", "#2F3E46", "#52796F", "#84A59D",
"#E76F51", "#F4A2... |
52874d8241fb7ad11833efd1fe2300fecb8dc21762a925cf93898277331fadb6 | Python | 69,558 | 1,693 | """
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.
Home of the AutoFrame classes which facilitate the generation of initial
and final frames for NEB calculations.
"""
from __future__ import ann... |
0c6f20b8ddb5ac96663ceca0936f51b382caaa65efb9ff31565f048aa3f5272c | Python | 69,985 | 1,688 | from __future__ import annotations
import warnings
from typing import TYPE_CHECKING, Literal, overload, get_args, get_origin
from typing import Union as LegacyUnionType
from warnings import warn
from functools import reduce
from operator import or_
import anndata as ad
import numpy as np
from anndata import AnnData
f... |
0b999717bb11d47166e7b1eb1f05a2892250606d49e687fc1a500d81b26354be | Python | 70,218 | 847 | import os
import psutil
import sys
import mozaik
from mozaik.visualization.plotting import *
from mozaik.analysis.technical import NeuronAnnotationsToPerNeuronValues
from mozaik.analysis.analysis import *
from mozaik.analysis.vision import *
from mozaik.storage.queries import *
from mozaik.storage.datastore import Pick... |
3907f9a7843f79c4c9431e7f421e0823e4963dbd9e18301b8f1ace3b00e231a6 | Python | 70,346 | 1,628 | import datetime
import logging
import os
import math
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import keras
from keras import layers
from keras.models import load_model
from keras.saving import register_keras_serializable
from ml4h.defines import IMAGE_EXT
from ml4h.TensorMap import ... |
ec0cafac5cdfd1c0e0bba08aa5e8e8e3ee2f7eac1d7e1a27651891fdee197b51 | Python | 70,833 | 1,784 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Initialize the component for the CNMF
contain a list of functions to initialize the neurons and the corresponding traces with
different set of methods like ICA PCA, greedy roi
"""
#\package Caiman/source_extraction/cnmf/
#\version 1.0
#\copyright GNU General Publi... |
b66c4238be5d779e65bc60ec9efc4e7f3d2b96c4d3ce4580686fa89f8d19af1a | Python | 70,981 | 1,906 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Suite of functions that help manage movie data
Contains the movie class.
"""
# \package caiman/dource_ectraction/cnmf
# \version 1.0
# \copyright GNU General Public License v2.0
# \date Created on Tue Jun 30 20:56:07 2015 , Updated on Fri Aug 19 17:30:11 2016
fro... |
ac1f7edc83928f92baeaaf84baf003c4310243a1fd137c5ce40af84e6b75960c | Python | 71,466 | 1,660 | # biolgca is a Python package for simulating different kinds of lattice-gas
# cellular automata (LGCA) in the biological context.
# Copyright (C) 2018-2022 Technische Universität Dresden, Germany.
# The full license notice is found in the file lgca/__init__.py.
"""
Classes for two-dimensional LGCA on a square lattice.... |
9ce5bc9b33a0b44424078c0d73ab387865006eb471d9a74c80a0a4b6a8e63575 | Python | 71,713 | 1,856 | import numpy as np
from matplotlib.colors import LinearSegmentedColormap
import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.font_manager as fm
import matplotlib.patches as mpatches
from matplotlib import rcParams
import random
import networkx as nx
import pandas as pd
import anndata
from sklearn... |
369971ede6c2905d16cb3b8e526691d7d96513d783d31beb02d9b36f00bf073a | Python | 71,759 | 2,207 | #!/usr/bin/env python3
# More imports below, but the user's choice of processors must be parsed before
# numpy can be imported.
import vamb
import numpy as np
import sys
import os
import argparse
import torch
import time
import random
import pycoverm
import itertools
from math import isfinite
from typing import Option... |
980db26db26540efee510e20b4adf9d9d5f66a9c90495297cd6cb24bfd724138 | Python | 71,891 | 1,589 | #########################################################################
# File Name: scRNA_anno.py
# > Author: CaoYinghao
# > Mail: caoyinghao@gmail.com
#########################################################################
#! /usr/bin/python
import sys
import argparse
import gzip
import os
import warning... |
2dff9d6b6e21d168a42354f5689de29b742859676364947c3549ae442597d34b | Python | 72,003 | 1,800 | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 30 09:44:00 2021
@author: ju-bar
Modified on Mon Jun 20 11:50:00 2022 (ju-bar) adding additional data dict
Functions and classes handling supercells of atomic structures
This code is part of the 'emilys' repository
https://github.com/ju-bar/emilys
published under the GN... |
425cf86a225545f8357ffba800df4bea2c83e0753f553254b14433cf828cd32f | Python | 72,323 | 1,822 | """
In-silico gene perturbation with downstream GRN reconstruction.
This module exposes :func:`perturb` — a unified entry point that knocks
out / over-expresses a gene (or list of genes) in an AnnData and returns:
* the predicted post-perturbation AnnData,
* a downstream GRN (``networkx.DiGraph``) representing how th... |
e644dbad61a45f0ea4191bc000648ef1fa511ee161da4574fb987b1c5d0248c5 | Python | 72,442 | 865 | import os
import psutil
import sys
import mozaik
from mozaik.visualization.plotting import *
from mozaik.analysis.technical import NeuronAnnotationsToPerNeuronValues
from mozaik.analysis.analysis import *
from mozaik.analysis.vision import *
from mozaik.analysis.lfp import *
from mozaik.storage.queries import *
from mo... |
ec7e889770ad799b105d246089c6fec46f0cf0da25a5c6b24db7c848ec57e15b | Python | 72,789 | 2,018 | import asyncio
import collections
import contextlib
import copy
import ipaddress
import json
import logging
import os
import socket
import subprocess
import sys
import time
import warnings
from types import SimpleNamespace
from unittest.mock import MagicMock
from urllib.parse import quote_plus
import pytest
import req... |
e7e7fa25b232e55d5bbf01e8c58ad571791374383e594b97e565a7c8f2856032 | Python | 72,834 | 1,987 | import pickle
import colorlover as cl
import numpy as np
import scipy.sparse as sp
import ipywidgets as widgets
import plotly.graph_objs as go
from . import SAM
from . import utilities as ut
import pandas as pd
from ipyevents import Event
from ipywidgets import Widget, Layout
import warnings
from numba.core.errors imp... |
6a7da28de74ce1150f6c9dfca9eafc990b393f10d83b6306c06b0b9e1187336b | Python | 73,272 | 2,324 | import pdb,sys,os
import timeit
import warnings
warnings.filterwarnings('ignore')
import argparse
import numpy as np
from sklearn.neural_network import MLPClassifier
import anndata
import scanpy as sc
import scipy
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import seaborn as sn
from scipy impo... |
8651643ab808aab4a4d584e38ae351ada370ba1295c19fa8ee457262ea192183 | Python | 73,595 | 1,634 |
'''
This module contains utilitary functions that used across pySTED.
Code written by Benoit Turcotte, benoit.turcotte.4@ulaval.ca, October 2020
For use by FLClab (@CERVO) authorized people
'''
import numpy
import numpy as np
import scipy, scipy.constants, scipy.integrate
import math
import random
import warnings
i... |
6227d466b8147182c9b2007acbb20c59310680cf342df627050e0891bb24eda0 | Python | 73,651 | 1,163 | 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.metrics import weighted_crossentropy
from ml4h.normalizer import Standard... |
dc9ffcdd47d8331a8fcc92b1d9e827760e9760d721a47057f30be3c1b55aa535 | Python | 73,809 | 1,483 | import torch
import numpy as np
import pandas as pd
import time, os
import scipy
import scipy.spatial
import Loss
from metrics import spearman_corr
def dist2bins(mat):
"""
This function is for label
bins definition: left open, right close. Because cutoff 8 definition: d<=8
two kinds of b... |
f8fef9cd25b1bf36aa5c8168e6b7b3bb7fba5cddcee716fa498ab4848dd5b8c0 | Python | 74,087 | 2,055 | import asyncio
import copy
import json
import logging
import os
import sys
import threading
import time
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from multiprocessing import Process
from unittest.mock import MagicMock, patch
import aiohttp
import numpy as np
import pytest
im... |
c79d5e93b9aa9a788395deebcd32e1eb889e018d2edf8e8479e9dadee59851a6 | Python | 74,183 | 1,706 | r"""Categorical plots that take a table, not an ``AnnData``.
``ov.pl`` has a violin plot and a stacked-proportion plot, but both start from
an ``AnnData``. These are the container-free versions, in the shape a
statistician expects: a long-form table plus the names of the category column
and the value column.
All of t... |
9e6ce1e52802d13c99af2323e0f404aabdd3fcdf220ed7704f5b300211024092 | Python | 74,264 | 2,205 | # coding: utf-8
import asyncio
import logging
import os
import re
import sys
import time
import numpy as np
import pytest
import torch
import ray
import ray._private
import ray.cluster_utils
from ray._common.test_utils import run_string_as_driver
from ray._common.utils import (
get_or_create_event_loop,
)
from ra... |
b7e74ed7c00277745525114e933e668f9e157e8eab74a95d2aed3b668e220c94 | Python | 74,394 | 2,281 | import logging
from contextlib import suppress
from dataclasses import dataclass
from functools import wraps
from typing import Any, Dict, Iterable, List, Literal, Optional, Sequence, Tuple, Union
import matplotlib as mpl
import matplotlib.patheffects as path_effects
import matplotlib.pyplot as plt
import numpy as np
... |
4aa900e1ae01c0344b578e8f21ab3cbbb1dbbaab0ce1e19c2a07330cfa3f8a26 | Python | 74,498 | 1,557 | from typing import Callable, Optional, Union, Tuple, Iterator
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import autocast
from convex_optim_base.prox_optim import ProxSolverParams
from new_style_optim.prox_optim import _optim_FISTA
from new_style_optim_encoder.glm_... |
2f54527b53f95dead1ad74e28aa4a268a803376027eb32f2e5704dfdb899c015 | Python | 74,706 | 2,220 | import asyncio
import fnmatch
import io
import json
import logging
import os
import pathlib
import random
import socket
import subprocess
import sys
import tempfile
import time
import timeit
import traceback
import uuid
from collections.abc import Hashable
from contextlib import ExitStack, contextmanager, redirect_stde... |
573a183c23b1eaf2b443c3f4820516d81582fc062531bd7aa85f8d26b7d02780 | Python | 75,065 | 1,992 | """TCR-specificity analysis for omicverse — the ``ov.airr`` TCR layer.
This module covers the *antigen-specificity* side of T-cell receptor
repertoire analysis — the part of the field concerned with grouping TCRs by
their (predicted) antigen rather than by clonal descent:
* :func:`tcrdist` — TCRdist positio... |
8ccd514dde5554550707516ba3d5ae3342d14c3e3d761e70cacb80586f0a1f6e | Python | 75,259 | 1,993 | from .._settings import Colors, EMOJI
from .._monitor import monitor
from .._registry import register_function
from .._optional import build_optional_dependency_error
@register_function(
aliases=['RNA velocity分析器', 'Velo', 'RNA velocity pipeline', 'dynamo scvelo regvelo wrapper', '细胞状态转变速度分析'],
category="singl... |
7a89b41a8bfa04b0ae51c89609d2612be4a1033a67ea265d96e3067bfe336778 | Python | 75,298 | 1,748 | #
# 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... |
d9bc7f71e0f253d3c0720850832f580637914a7b01433e976b2ab318b672e7a8 | Python | 75,387 | 1,628 | from os import path, listdir, getcwd, remove
import inspect
import pandas as pd
import re
import shutil
import multiprocessing as mp
import nipype.interfaces.io as nio
import nipype.interfaces.utility as util
import nipype.pipeline.engine as pe
import os
from shutil import copyfile
from copy import deepcopy
from itert... |
440380a21c9fb1aef9f45a0376bef16c2b0770e0bab06d1261610f234611d2e2 | Python | 75,538 | 2,064 | # 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... |
9f3418b396ec9ccbea30d1f1de92b55e631a3380ebbb19257a73f0219e2a23a6 | Python | 76,217 | 1,964 | """Standalone version of Structured State Space sequence model (S4)."""
from collections import defaultdict
from typing import Optional, Mapping, Tuple, Union
import logging
from functools import partial
import math
import numpy as np
from scipy import special as ss
import torch
import torch.nn as nn
import torch.nn.f... |
2d4822434de476f3f5d28357493e0d49e889435032bbf7b7ced45781803c27d8 | Python | 76,472 | 1,920 | import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.colors import Normalize
from matplotlib.cm import ScalarMappable
import scanpy as sc
from .._registry import register_function
from .... |
44d2f525d4dcc7d582886bcc32610b51d780fb72e173715c6444dbd7fa7045b7 | Python | 76,705 | 1,910 | from ._scatterplot_backend import _embedding
from .._registry import register_function
from ._plotdata import get_values
from ._plotdata import accepts_frame
from ._plot_backend import style_axes
import collections.abc as cabc
from copy import copy
from numbers import Integral
from itertools import combinations, produc... |
3a170c9b5e3782fdc81930fb6f60939020f4f5d2b3da450234d17cb545d91521 | Python | 76,920 | 1,543 | import os, sys
import time
import numpy as np
import pandas as pd
from lmfit import Model
path_results = "../../Data/results"
path_simulation_general = os.path.join(path_results, "curve_fits", "compare_fitting_methods")
path_output = os.path.join(path_simulation_general, "simulations")
functions_modul = "../functions"... |
54cd20f5d49e7c60c16769fa771f15affa081201ca1e495fd7ed39f395cb7140 | Python | 77,191 | 1,808 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------
# Created By : Kangjoo Lee (kangjoo.lee@yale.edu)
# Last Updated: 08/06/2024
# -------------------------------------------------------------------------
# =========================================... |
0ebe8c5d3add5f0d56d250313821af70458eba8bcd93e4e88ec70f9075f05adb | Python | 77,318 | 1,734 | """
scFoundation model implementation with simplified interface.
"""
import copy
import json
import os
import time
import warnings
from pathlib import Path
from typing import Dict, Any, Optional, Union, List, Tuple
from tqdm import tqdm
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
from to... |
2fd9e9f9452b682bf697c8ab4ee369bf4957de564ea1b634fdd1ccc14c879169 | Python | 77,322 | 1,927 | import numpy as np
import pandas as pd
import sys
import os
from time import sleep, time, strftime
from typing import List, Optional, Union
from itertools import chain
from functools import wraps
from ..core.BayesNet import *
from ..core import gpu_utils
from ..build_model.build_model import *
from ..build_model.save_... |
90746bc4362d0fe73b5e9d1ccc57e0243475074465668ce8e08e7a3440580dec | Python | 77,463 | 2,187 | """
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.
Tests: MLIPPredictUnit + ParallelMLIPPredictUnit — single-dataset
and multi-dataset prediction, internal graph-gen versions 2/3,
... |
af304ebf3a01f7f595877a3047dcf68829bcdbf0a474124b815a5d444a9bec5c | Python | 77,943 | 2,366 | """Plotting utils."""
from numbers import Number
from typing import Any, Dict, Iterable, List, Literal, Optional, Tuple, Union
import matplotlib as mpl
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn.functional as F
from matplotlib import colormaps as... |
18005b42ad265cca20db8584089bc90a19123c4019ff050898a3302b7d5d9b73 | Python | 77,949 | 1,947 | # -*- coding: utf-8 -*-
"""
Created on Mon May 22 15:51:00 2023
@author: ju-bar
Class implementation calculating inelastic scattering coefficients
for phonon EELS using a density of states
This code is part of the 'emilys' repository
https://github.com/ju-bar/emilys
published under the GNU General Publishing License,... |
5496c270c39af44050b358acc8c0fd3f22a7ed90fe5cfe74c6c2861ec5668078 | Python | 79,522 | 2,307 | import logging
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "1"
import pickle
import random
import sys
import time
from pathlib import Path
import dask.dataframe as dd
import numpy as np
import click
import keras.backend as K
import pandas as pd
import pybedtools
import tensorflow as tf
from joblib import Parallel, ... |
ea8b52546762237f4a2c20dd0fe0b2c6c23a6580a92546f822080341238a6ed4 | Python | 79,581 | 1,878 | import logging
import math
import time
import uuid
from collections import defaultdict
from typing import Dict, List, Optional, Set, Tuple
from ray._common.utils import binary_to_hex
from ray.autoscaler.v2.instance_manager.cloud_providers.kuberay.cloud_provider import (
KubeRayProvider,
)
from ray.autoscaler.v2.in... |
9019a5d739d52a1a990a6a5476e276943631fce87bd01650543cab38e6e8d69a | Python | 79,750 | 26 | from pathlib import Path
import pandas as pd
from data_profiling import ProfileReport
from data_profiling.utils.cache import cache_file
if __name__ == "__main__":
file_name = cache_file(
"orange_prices.csv",
r"https://fred.stlouisfed.org/graph/fredgraph.csv?bgcolor=%23e1e9f0&chart_type=line&drp=0... |
ae0b13d956c977d11a632fd0bf7e9cca8985551701f993d4c5bd90814bb073c8 | Python | 80,000 | 1,168 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'auto_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, Qt... |
8f77bd192e367e42eb80d5f60f2cb5db6985275dcfa78859fd33670f0da7797e | Python | 80,457 | 2,153 | import collections.abc as cabc
from copy import copy
from numbers import Integral
from itertools import combinations, product
from pathlib import Path
import matplotlib
from typing import (
Collection,
Union,
Optional,
Sequence,
Any,
Mapping,
List,
Tuple,
Literal,
)
from warnings imp... |
f4b49604ac8c9be50cc8c162fba08137752323946ee9ff2007d8f5b67be08c12 | Python | 80,543 | 1,881 | #!/usr/bin/env python
# ================================
# @auther: Rongbin Zheng
# @email: Rongbin.Zheng@childrens.harvard.edu
# @date: May 2024
# ================================
import os,sys
import time
from datetime import datetime
import numpy as np
import pandas as pd
import traceback
import matplotlib
import ... |
fa79c3bddccc661cc16abc201d6b9844e22c5882892f87914ca1fadd84c4a9cf | Python | 80,582 | 2,001 | """
The following code defines classes and functions for the main GUI.
Signficant contributions and help from Chris Ward, Savannah Lusk, Andersen Chang, and Russell Ray.
***
built as part of the Russell Ray Lab Breathing And Physiology Analysis Pipeline
***
Breathe Easy - an automated waveform analysis pipeline
Copyri... |
439a2e69c6a1de729ad06fc6b1eb7d6138e380ffac14922d501e6568c397d543 | Python | 81,392 | 2,434 | """This package includes all transformations functions.
They are transformations-classes and can be concatenated
"""
import numpy as np
import numpy.ma as ma
import torch
import copy
## Normalization
class PercentileNormalize(object):
"""
Percentile based normalization
Attributes
----------
... |
b09ac65244b10b244075c10154102b1ab90445e09bbf2ea7cdde3a1cfc245a66 | Python | 81,403 | 1,713 | import anndata
import builtins
import contextlib
import math
import numpy as np
import scanpy as sc
import pandas as pd
import igraph as ig
import matplotlib
from datetime import datetime
from typing import Union,Tuple
from .._settings import add_reference
from .._registry import register_function
#from ..via.utils_v... |
6f8553e994cf78a74d2bd712d67a09588d1a1d0404cbc62f73b7a6f40c803962 | Python | 81,931 | 2,209 | #
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# 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 ... |
90846298c837b22b6011fb53e3b12be13378f4fbdef04366b0c3615688fd017f | Python | 82,129 | 2,238 | import asyncio
import datetime
import json
import logging
import os
import socket
import sys
import traceback
from collections import defaultdict, namedtuple
from concurrent.futures import ThreadPoolExecutor
from typing import List, Optional, Tuple
import requests
from grpc.aio import ServicerContext
from opencensus.s... |
0a1521de27d4eb526a8e5b381decc6cd70dceceb88ded655d9a5abd04e511451 | Python | 82,887 | 1,864 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.autograd as autograd
import numpy as np
from typing import Dict, List, Tuple, Callable, Union, Optional, Any
from denoise_inverse_alg.flashed_recons_glm_components import flashed_recons_compute_feedback_exp_arg, \
flashed_recons_comp... |
77998f97a44206c87dc85b8f1eb3218308c8bfd8771569cb753066f7d0585d4f | Python | 82,916 | 1,708 | r"""
Different Expression analysis in Python
"""
import numpy as np
import pandas as pd
import statsmodels.api as sm
import anndata as ad
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
import matplotlib
from typing import Union, Tuple, Optional, Any
from ..utils import plot_boxplot
from .._regi... |
aab108b4fbbb76eeefb38bc5cf8ef9dd89fb97816ea918e49151f0530a59d2d5 | Python | 83,266 | 1,853 | from typing import List, Dict, Tuple, Callable, Iterator, Union, Optional
import numpy as np
import torch
from torch import autocast
import lib.data_utils.dynamic_data_util as ddu
from convex_optim_base.prox_optim import ProxFISTASolverParams
from convex_optim_base.unconstrained_optim import FistaSolverParams
from gl... |
ec155277ac8b5b1e7088bfda262fdc23e0a3375df8ca69f91ee6bb9debe30671 | Python | 83,304 | 1,670 | # -*- coding: utf-8 -*-
# TODO: Remove this once we switch to Python 3
r"""
The file contains stimuli that use topographica to generate the stimulus
"""
from mozaik.stimuli.vision.visual_stimulus import VisualStimulus
import math
import imagen
import imagen.random
from imagen.transferfn import MaximumDynamicRange, Fi... |
1b27815d271d3c6f2661dca5fd97f26b68c95459d1be775c56fc55efbf4e5774 | Python | 83,441 | 2,202 | from __future__ import annotations
from dataclasses import dataclass, field
import numpy as np
import pandas as pd
from scipy import optimize, special, stats
from scipy.stats import rankdata
from statsmodels.nonparametric.smoothers_lowess import lowess
def _as_weight_matrix(weights, shape: tuple[int, int], row_inde... |
6835a9c04177741022e8959e6804e9badff811f4886b4e4b66e15244fcb22e23 | Python | 83,746 | 7,638 | """
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.
k-hot elemental embeddings from QMOF, motivated by the following Github Issue threads:
https://github.com/txie-93/cgcnn/issues/2
https://githu... |
de58e3968f9f5b9c91a9dbe5480c49ce0d1397be98261fc2bb0bc3579f48502c | Python | 83,792 | 1,566 | import inspect
import multiprocessing
import os
import shutil
import signal
import sys
import warnings
from copy import deepcopy
from datetime import datetime
from time import time, sleep
from typing import Tuple, Union, List
from uuid import uuid4
import numpy as np
import torch
from batchgenerators.dataloading.multi... |
8a6adc1a38aa01bf4823c7ac8a25efebb9713131f973b35187097adb56e9bf2f | Python | 84,243 | 2,327 | import sys
import math as python_lib_Math
import math as Math
import inspect as python_lib_Inspect
import sys as python_lib_Sys
import builtins as python_lib_Builtins
import functools as python_lib_Functools
import traceback as python_lib_Traceback
from io import StringIO as python_lib_io_StringIO
class _hx_AnonObje... |
931c33e43b45c902a8876b7be51d8752812029a64d296b4da1a92f665b3733aa | Python | 84,850 | 1,920 | # -*- 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-locals, no-member
"""Tests for AnalogContext data attribution (PR #717).
Verifies the public AnalogContext data modes: metadata-only ... |
82846240e1157be1df5ed20589198ac029417a4999ea8159aa32f9b0927e1dc6 | Python | 84,858 | 1,985 | #!/usr/bin/env python
import numpy as np
import pandas as pd
import os, errno, sys
import datetime
import itertools
import yaml
import subprocess
import scipy.sparse as sp
from scipy.spatial.distance import squareform
from sklearn.decomposition import non_negative_factorization
from sklearn.cluster import KMeans
fro... |
2aae3e027915abe4f7355bf0da4a23e2bb0195da6a781f16136fe7fdbb3d9bcd | Python | 85,524 | 1,714 | # explorations.py
# Imports
import os
import csv
import math
import copy
import logging
import operator
import datetime
from scipy import stats
from seaborn import lmplot
from functools import reduce
from itertools import combinations
from collections import defaultdict, Counter, OrderedDict
from typing import Dict, L... |
bc4bc6aa4c703b3dc948df38af564383e9620ab34567de3890aca7a6082cdd49 | Python | 85,692 | 1,631 | #!/usr/bin/env python
import sys
import os
import argparse
import json
import warnings
import dill
import numpy
import pandas
import scipy
import scipy.stats
from sv_utils import common, genomics_io, pedigree_tools, interval_overlaps
from typing import List, Text, Optional, Dict, Tuple, TypeVar, Union, Collection, Cal... |
24a2ea476e4ec33766228ec356d3e2a149aea0ad1b06946a29dd6aea00e6099e | Python | 86,896 | 2,259 | # Copyright (C) 2018-2022 Intel Corporation
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import concurrent.futures
import fnmatch
import itertools
import os
import shutil
from collections.abc import Callable, Iterable, Iterator, Sequence
from contextlib import closing
from copy import deepcopy
... |
34a9422f42eb7be50e7fc33bd8f82fa19b7da5ce024815a252c5bf7f967d4d29 | Python | 87,466 | 1,075 | import os
import psutil
import sys
import mozaik
from mozaik.visualization.plotting import *
from mozaik.analysis.technical import NeuronAnnotationsToPerNeuronValues
from mozaik.analysis.analysis import *
from mozaik.analysis.vision import *
from mozaik.storage.queries import *
from mozaik.storage.datastore import Pick... |
078ff65e0a69cb2986e9556190a132720645f98cf07a81811b0bffb4855d02fc | Python | 87,475 | 2,480 | """
Analysis of currents in response to moving edges.
Info:
Relies on dataclass defined in `flyvis.analysis.stimulus_responses_currents`.
"""
from __future__ import annotations
from typing import Any, Callable, Iterable, List, Union
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from dat... |
69ec8526e6bb308e28f206a6d336b96523be057fd7ccc362d72c019231619e26 | Python | 87,599 | 2,326 | """
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.
Triton GPU kernels for block-diagonal Wigner operations at lmax=2.
This file contains ONLY Triton @jit kernels. Python wrappers and autograd
f... |
45d5ccc4c741d9b51fd6653ff8deb05df659f6bd302b648c2ec4f3fbb558df4c | Python | 88,882 | 2,375 | #copy from squidpy.pl._spatial.py
#remove some functions that are not needed
from __future__ import annotations
import itertools
from collections.abc import Mapping, Sequence
from copy import copy
from functools import partial
from numbers import Number
from types import MappingProxyType
from typing import TYPE_CHEC... |
de6a34f1b5ad5fd4f1c91bce3f4d7265850e9c2aa9beed2f08023a4c0e117665 | Python | 90,859 | 2,127 | """Ray Data datasource for LeRobot Dataset v3."""
from __future__ import annotations
import enum
import functools
import json
import logging
import os
import shutil
import tempfile
import weakref
from pathlib import Path
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterator,
List,
Literal,
... |
9768dc85416412a26a8659cd4a85c846e09c77a4f40f39bced60918b392451db | Python | 91,085 | 2,411 | """
MCP server for the OmicVerse registry.
Exposes registered tools via the Model Context Protocol, with built-in
meta tools for discovery and session management.
"""
from __future__ import annotations
import asyncio
import contextlib
import json
import logging
import sys
import time
import uuid
from difflib import ... |
9a4767d243f9c39667e39836e4100bdb35fd6427442e88ca0f11ab4426478bbb | Python | 92,171 | 2,518 | import math
import os
import sys
import time
# coding: utf-8
from collections import defaultdict
from unittest import mock
from unittest.mock import MagicMock
import pytest
from ray._common.utils import binary_to_hex
from ray.autoscaler.v2.instance_manager.config import InstanceReconcileConfig, Provider
from ray.aut... |
f51c9146da65284a4c63dda66d7902a4209cc122aa06bfff441197a9b6bc23e3 | Python | 92,479 | 2,515 | from typing import Union, Optional, List, Tuple, Dict, Literal, Sequence, Callable, Any
import collections.abc as cabc
import warnings
from copy import copy
import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler
from scipy.stats import gaussian_kde
import scanpy as sc
from anndata impo... |
7114d7e15582226fe19c4064df2581b6cb885a93fcd3313e3841d2eeb336446d | Python | 92,961 | 2,721 | import numpy as np
import pandas as pd
import itertools as it
import general.plotting as gpl
import general.paper_utilities as pu
import general.utility as u
import general.data_io as gio
import swap_errors.visualization as swv
import swap_errors.auxiliary as swa
import swap_errors.analysis as swan
config_path = "swa... |
d92dcdbd750c91361e9fc3105216172a11f5899f81177bad6e1d715518a0b8f2 | Python | 93,146 | 1,953 | import elikopy.utilsSynb0Disco as util
import nibabel as nib
import numpy as np
from random import shuffle
import math
import glob
import sys
import datetime
import time
import os
import json
import shutil
import matplotlib.pyplot
from future.utils import iteritems
import subprocess
from dipy.data import get_sphere
f... |
2476cde18d4a3e276249532934dde51a8b1a563036b178053d86c4910357c639 | Python | 93,289 | 1,313 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'basic_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, Q... |
e60b214cb9c4a784266bd7bd03c269433a847ceebb71d7e90f0efeed976f5507 | Python | 93,686 | 1,961 | #!/usr/bin/env python
import io
import os
import sys
import ast
import types
import warnings
from enum import Enum
from types import MappingProxyType
from typing import Text, Union, Tuple, Mapping, Optional, Any, Dict, Callable, Sequence, List, Collection, ValuesView, \
Iterator, Set, Iterable, TypeVar
import numpy... |
89f16f91c16c0b8f91d190256eff61bec6764b04d944203babc9e026fd31a985 | Python | 94,757 | 2,024 | r"""
This module defines the :class:`mozaik.visualization.plotting.Plotting` API and offers
a library of plotting commands derived from it.
The plotting API
----------------
The high-level plotting API is defined by the :class:`mozaik.visualization.plotting.Plotting` class.
Each class derived from `Plotting` should... |
f658dbbffa222e71b93051bfef422d8e144e4ad552a24fbc4e2d45f08983d7ed | Python | 95,389 | 2,720 | # -*- coding: utf-8 -*-
# Version 0.9.0, commit bf58e37e6b35e3cc9a0bd740f752abfd32b6e6f8
"""Pretty-print tabular data."""
from collections import namedtuple
from collections.abc import Iterable, Sized
from html import escape as htmlescape
from itertools import chain, zip_longest as izip_longest
from functools import... |
e646500021cdd45d9bb76a3587dc041bb3eb88246c5d3899f19386d618329ab5 | Python | 95,909 | 2,076 | '''
test_k4a_azurekinect.py
Tests for the k4a functions for Azure Kinect device.
Copyright (C) Microsoft Corporation. All rights reserved.
'''
import unittest
import ctypes
from time import sleep
import k4a
import test_config
def get_1080p_bgr32_nfov_2x2binned(device_handle):
return test_config.get_captur... |
170f4f04a93cec1167c0dd3176538f9b715609a151abcb172dc57b2e38d76682 | Python | 96,450 | 2,118 | import os
import time
from subprocess import call
import numpy as np
import pandas as pd
import seaborn as sns
from scipy import stats
import seaborn as sns
import matplotlib.pyplot as plt
import scipy as sc
from matplotlib.colors import ListedColormap
import scipy.sparse as sparse
import importlib
import copy
import ... |
2daeb526b22540f19cde2441c0b22be5d855486f042d7c60fc23b2a1f7acb2b5 | Python | 96,602 | 2,337 | import copy
import logging
import time
import uuid
from abc import ABC, abstractmethod
from collections import defaultdict
from dataclasses import dataclass, field
from enum import Enum
from typing import Dict, List, Optional, Tuple
from ray._private.protobuf_compat import message_to_dict
from ray._raylet import IMPLI... |
7fe4dc531734b3447ddf91b6fecc364211d4b4de47b10501c272c15357fcbbd3 | Python | 97,416 | 2,296 | import atexit
import collections
import datetime
import errno
import json
import logging
import os
import random
import signal
import socket
import subprocess
import sys
import tempfile
import threading
import time
import traceback
from typing import IO, TYPE_CHECKING, AnyStr, Optional, Tuple
import ray
import ray._pr... |
0396102911c325e456373735cae3dd47f09508a6493544c80b27dad5a03dd144 | Python | 97,668 | 1,994 | #!/usr/bin/env python
""" Online Constrained Nonnegative Matrix Factorization
The general file class which is used to analyze calcium imaging data in an
online fashion using the OnACID algorithm. The output of the algorithm
is storead in an Estimates class
More info:
------------
Giovannucci, A., Friedrich, J., Kaufm... |
35594f41f28d43d4d75499f19bda1b92a1af08da232a6795c236fcf2a3ced229 | Python | 98,981 | 2,248 | # -*- coding: utf-8 -*-
'''
Document Module
'''
from __future__ import division
from collections import OrderedDict
from time import time
from uuid import uuid4
import numpy as np
import pkg_resources
from dipy.utils.optpkg import optional_package
from .fitted_modeling_framework import (
FittedMultiCompartmentMo... |
3efc1fdb0ccdad269f196a0ee7b5e666df1565c39ceb84df72c6957a7221168c | Python | 99,119 | 2,749 | # 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.