sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
4ac3e4fd07016bfb4bd777ddda92ac110f55c1eae92b6fe4a1e2b077c10b6319
Python
21,822
583
""" This file contains a minimal set of tests for compliance with the extension array interface test suite, and should contain no other tests. The test suite for the full functionality of the array is located in `pandas/tests/arrays/`. The tests in this file are inherited from the BaseExtensionTests, and only minimal ...
fd1b93a3c8c35c9ba27d256d48ee028be2d19e5b2b23a7f7549affb79c9e5f75
Python
21,822
525
import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.core.arrays.sparse import SparseArray @pytest.fixture def arr_data(): return np.array([np.nan, np.nan, 1, 2, 3, np.nan, 4, 5, np.nan, 6]) @pytest.fixture def arr(arr_data): return SparseArray(arr_data) class Tes...
29023143f4cc9ecc6e447601ad2b6ef420bdc53c04e3c420284fce9583de5809
Python
21,823
600
from __future__ import annotations from datetime import ( datetime, time, timedelta, ) from decimal import Decimal import re import numpy as np import pytest from pandas.compat import ( pa_version_under18p0, pa_version_under19p0, ) from pandas.core.dtypes.dtypes import ( ArrowDtype, ) impor...
a95e46c5d5b5b6b8e52fc06af08eadf960925cac2a68c9f850dd5d5a21db4472
Python
21,844
844
"""Utility functions for the SAM algorithm. This module provides helper functions for PCA, nearest neighbor computation, gene correlation analysis, and other common operations. """ from __future__ import annotations import errno import os from typing import TYPE_CHECKING, Any import numpy as np import scipy as sp i...
a0e2d8ca53fe16b7dc007c8cf462457c525acb37540a23b8687c6c01696b8441
Python
21,846
514
"""Test dali dataloading functionality.""" import os import shutil from unittest.mock import MagicMock, patch import numpy as np import pandas as pd import pytest import torch pytest.importorskip('nvidia.dali', reason='nvidia-dali not installed') from lightning_pose.data.video import dali as dali_module from lightn...
ab8c19f56ef1bf7748a55d64ca4fb33dc33c9a046fed1d8d170928323016ab7a
Python
21,858
612
# Copyright 2018-2024 Xanadu Quantum Technologies 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...
f97426283c7df496d33e38c4e0ba83917158a2f46fd1c56353b45cb1760b1252
Python
21,874
641
#!/usr/bin/env python3 # # 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 requir...
5ba5cb2db29dc19164cec5c3b8c18546ca622a7350956466bb9b15e43e1836c3
Python
21,880
642
import numpy as np import pytest from pandas.compat import is_platform_arm from pandas.errors import NumbaUtilError import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm from pandas.api.indexers import BaseIndexer from pandas.util.version import Version pytestmark = [pytest.mark....
d28cd4c834c49bc64128f1b4d6cff9f89fff4d00d2036e5b65591e9a3aaab9d0
Python
21,880
665
from __future__ import annotations from functools import wraps from typing import ( TYPE_CHECKING, Any, Literal, Self, cast, overload, ) import numpy as np from pandas._libs import lib from pandas._libs.arrays import NDArrayBacked from pandas._libs.tslibs import is_supported_dtype from pandas...
5f6674573ba4c0a0ec800efc0a0405c1da3cd66be228e9994fb79453af152503
Python
21,883
701
from textwrap import dedent import numpy as np import pytest from pandas.compat import is_platform_windows from pandas.errors import Pandas4Warning import pandas as pd import pandas._testing as tm from pandas.core.indexes.datetimes import date_range @pytest.fixture def test_frame(): return pd.DataFrame( ...
d26ac7c14676fd2b0c8c79450b9ec3befdd1119b07c466f96b1829fcbfef4385
Python
21,891
572
#! /usr/bin/env python ############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this wo...
345c3c23524838b606dd67f8b7f30fbb805ba39067f857b87ec850c97b262d47
Python
21,929
737
""" missing types & inference """ from __future__ import annotations from decimal import Decimal from typing import ( TYPE_CHECKING, TypeVar, cast, overload, ) import warnings import numpy as np from pandas._libs import lib import pandas._libs.missing as libmissing from pandas._libs.tslibs import ( ...
47c1b4584a8dee172c79f35a5051f566977225225837451bead4aae47c4b99e2
Python
21,931
526
from __future__ import print_function from pymatch import * import pymatch.functions as uf class Matcher: """ Matcher Class -- Match data for an observational study. Parameters ---------- test : pd.DataFrame Data representing the test group control : (pd.DataFrame) Data represe...
f25e4c8ffd7f8270349c01bb697f5ed0f1335f7509669c3c448d6ff4f8843523
Python
21,944
526
from __future__ import print_function from pymatch import * import pymatch.functions as uf class Matcher: """ Matcher Class -- Match data for an observational study. Parameters ---------- test : pd.DataFrame Data representing the test group control : (pd.DataFrame) Data represe...
3fae6a3e2c4c359f07fc6e299533460d0cd53ffd20ee6949f779856850445cb4
Python
21,946
594
# Copyright 2024 Xanadu Quantum Technologies 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 agre...
6dae8a27b0e5b0eb69a8e592d0795b7be061cb63a3d730b070f959277f2cc26c
Python
21,956
533
# ------------------------------------------------------------------------------------------------------------------------------------- # Following code curated for GCPNet (https://github.com/BioinfoMachineLearning/GCPNet): # ----------------------------------------------------------------------------------------------...
99dd6405f419a01543210073ed364bd6eebd8eafe99652ce12ec519ae8224e41
Python
21,964
553
# Copyright 2026 Xanadu Quantum Technologies 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 agree...
a52f5f6e71932b22ae735457dff3aea2c9338d66b3d5c0b8b1bb6197679c7737
Python
21,968
726
from datetime import ( datetime, timedelta, ) import numpy as np import pytest from pandas._libs.tslibs.ccalendar import ( DAYS, MONTHS, ) from pandas._libs.tslibs.offsets import _get_offset from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG from pandas.compat import is_platform_windows from ...
e5af6cc5a671d1c3db3fd6eca0d8de84ba8f0c216bb8fcd7e1c55cfb43458b26
Python
21,968
738
""" missing types & inference """ from __future__ import annotations from decimal import Decimal from typing import ( TYPE_CHECKING, Any, TypeVar, cast, overload, ) import warnings import numpy as np from pandas._libs import lib import pandas._libs.missing as libmissing from pandas._libs.tslibs ...
03bb05d0f6d5000000bb8a27c8255415cd6a22f81eb0297ce39c0fbd74e39711
Python
22,006
637
#!/usr/bin/env python # Time-stamp: <2025-09-29 15:10:49 Tao Liu> import io import unittest import pytest from MACS3.IO.PeakIO import PeakIO from MACS3.Signal.Region import Regions class Test_Regions(unittest.TestCase): def setUp(self): self.test_regions1 = [(b"chrY", 0, 100), ...
d1fa99e39663de2109dad09a9cf61567db9232e3c32eb42c275b82f2788e93e3
Python
22,026
621
from itertools import chain import operator import numpy as np import pytest from pandas._libs.algos import ( Infinity, NegInfinity, ) import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm from pandas.api.types import CategoricalDtype @pytest.fixture def ser(): retu...
f12df4fcc5e3898b434fc6318fc2223b04274f6918721e075bfa81b18adf40f1
Python
22,063
611
''' copy_ppp_imagery.py Rename and copy PPP PNGs ''' import argparse from glob import glob from datetime import datetime, timezone from io import BytesIO import json import os from pathlib import Path import re import shutil import sys import colorlog import boto3 from botocore.exceptions import ClientError import...
335038fa17aa43ed0315aaa6e4dc261b3581342dc2a662dd885bb00c1a085271
Python
22,102
456
"""Test the data factory module.""" import copy import os from unittest.mock import Mock import numpy as np import pytest from omegaconf import OmegaConf from omegaconf.errors import ValidationError from PIL import Image from lightning_pose.data import ( get_data_module, get_dataset, get_imgaug_transform...
4ba59bc11b47e33c20809a3236426148d3878cf4de7fe6bf1fda8b42a2292598
Python
22,112
476
""" These codes are from https://github.com/tctianchi/pyvenn/blob/master/venn.py """ # coding: utf-8 from itertools import chain try: # since python 3.10 from collections.abc import Iterable except ImportError: from collections import Iterable import matplotlib.pyplot as plt import matplotlib.patches as p...
1b31f4e6e30ae4a385d2b18115d1884cda80169ec29b956b9371b2493bc74b64
Python
22,120
479
import torch import torch.nn as nn import torch.nn.functional as F from kornia.utils import create_meshgrid from kornia.geometry.transform import warp_affine from kornia.geometry.linalg import transform_points import kornia from typing import Tuple, Union import ipdb class TPS: """Most of the code for the Thin Pl...
a8bd9bbc935dc5fcb1b31100c8c7cfb792c5fdf9d1c6749d26951d5f302d98e0
Python
22,121
573
# Copyright 2026 Xanadu Quantum Technologies 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 agre...
65218620dbda6432ac9f7daa394349398241f149b13252ceaf36c06cb5923a2b
Python
22,122
696
import os import sys import get_pdbinfo as pdbinfo import chimera from chimera import runCommand as rc import fileinput import copy ##### Part1 transfer Hg to Flag or Flag to Hg def Hg2toFlag(filename): """ change Hg2+ ion atom name to be FLAG """ f = open("tmp","w") for lines in fileinput.input(file...
23b7466e9a71bbe98f426037e071c85e57b0039d200a22373c1ef8a9073e3866
Python
22,125
643
import os from datetime import datetime import numpy as np import pandas as pd import torch from scipy.special import softmax from sklearn.metrics import ( accuracy_score, precision_recall_fscore_support, r2_score, roc_auc_score, ) from torch.nn import CrossEntropyLoss, L1Loss, MSELoss, NLLLoss from to...
4420a973269b764fe6b0fc8ad3a5386baf71af9c20f4ea1f2245326aca052bf0
Python
22,127
557
# Copyright 2026 Xanadu Quantum Technologies 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 agre...
662b7740d5ac0dd5279464a14c4ccbec6c9ce83759583942bcb2011f6447a148
Python
22,128
526
"""Tests for ModelConfig.validate() and its sub-validation methods.""" from pathlib import Path from unittest.mock import patch import pytest from omegaconf import OmegaConf from lightning_pose.api.model_config import ModelConfig # --------------------------------------------------------------------------- # Helper...
1351a94e11be0f7a189cea652476b45c97bf177139c16a3d25cdc8bc8518d7d9
Python
22,136
481
import torch import torch.nn as nn import torch.nn.functional as F from losses.modules import * from losses.homography import * class UnSupLoss(nn.Module): def __init__(self): super(UnSupLoss, self).__init__() self.ssim = SSIM() def forward(self, imgs, cams, depth, stage_idx): # prin...
4c2ba9bf88b9a7e36b5019745380eeb1f3d6c8fe3eb11e976bd85df3f9a9abf2
Python
22,137
574
# Copyright 2024 Xanadu Quantum Technologies 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 agre...
59893dd779ff89a279c22014e129fce056460dfb804139abd9a7feab681943b4
Python
22,143
570
import enum from statistics import mean import pytest from pgen import models, esm_msa_sampler from pgen import likelihood_esm_msa from io import StringIO from pgen.esm_msa_sampler import ESM_MSA_ALLOWED_AMINO_ACIDS import tempfile import pandas as pd import torch ####### Fixtures ####### @pytest.fixture(scope="sessi...
bb7d694eccece3bef50ee69c5dcd669454a9d1f13281449cd7ae5df97b78aed5
Python
22,161
712
# -*- coding: utf-8 -*- """mtscomp tests.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ from contextlib import redirect_stdout import io from itertools import product import json import has...
29e634cb52f5c12497dca47ac278a827ce8dea9d7dda3f54b54862e87fe5c497
Python
22,237
573
"""Base classes for NiMARE.""" import gzip import inspect import logging import multiprocessing as mp import pickle from abc import ABCMeta, abstractmethod from collections import defaultdict from hashlib import md5 import nibabel as nb import numpy as np from nilearn._utils.niimg_conversions import _check_same_fov fr...
bb6a32ab2beae30bcef24b3f84675f835aa0018b30898dfeef8692e81b7f3d79
Python
22,243
590
from functools import partial from itertools import pairwise import re import numpy as np import pytest import pandas.util._test_decorators as td from pandas.core.dtypes.common import is_unsigned_integer_dtype from pandas.core.dtypes.dtypes import IntervalDtype import pandas as pd import pandas._testing as tm from ...
30fe8d2ee9716000f5a532cc95a1e4b01a02066999a3ba20be3060c8bcc97049
Python
22,256
620
import numpy as np import pyqtgraph as pg from kilosort.gui.logger import setup_logger from kilosort.gui.palettes import COLORMAP_COLORS from PyQt5 import QtCore, QtWidgets logger = setup_logger(__name__) class DataViewBox(QtWidgets.QGroupBox): channelChanged = QtCore.pyqtSignal(int, int) modeChanged = QtCor...
330e9d8a193f0c05a0492e155b3acde14c916cbebf5615367843dc5321f95c0c
Python
22,259
542
# Copyright 2018-2023 Xanadu Quantum Technologies 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...
17ce80e38a3154ad1d7db7baeb257669161cb478c0abd43f43fd5b454008d4c4
Python
22,264
656
from typing import Dict, List, Optional, Tuple, Union import numpy as np import pandas as pd import statsmodels.api as sm from statsmodels.tools.sm_exceptions import MissingDataError as SmMissingDataError from statsmodels.tsa.api import kpss from statsmodels.tsa.stattools import adfuller from pycaret.internal.logging...
4c2f518ca8657e1b4879f452f4f29b4478629e6d11a92312a31b830769382858
Python
22,279
515
import torch import numpy import matplotlib.pyplot as plt import bionetwork import plotting import pandas import time import copy class drugLayer(torch.nn.Module): def __init__(self, nodeList, drugInName, drugNetwork): super(drugLayer, self).__init__() targetInName = numpy.unique(drugNetwork['targe...
15a1cdb2a26b1b510dc329ee71df8107a09b4d76f6ccc6605c6d0eaa99dccd6b
Python
22,292
581
"""CBMA methods from the activation likelihood estimation (ALE) family.""" import logging import multiprocessing as mp import numpy as np import pandas as pd from tqdm.auto import tqdm from ... import references from ...due import due from ...stats import null_to_p, nullhist_to_p from ...transforms import p_to_z from...
ea4227327dc211938cfcff09952ed0a315d0c557e4394845a6c97f886e6345b5
Python
22,321
418
import torch import torch.nn as nn import torch.nn.functional as F from .modules import * from typing import List, Tuple, Dict, Callable, Any, Union from collections import OrderedDict Align_Corners_Range = False class ListModule(nn.Module): def __init__(self, modules: Union[List, OrderedDict]): super(Li...
12518d0ec30aa81fdf0078c83bb82ccfc84821aab0ea038b82f908ce4be7a714
Python
22,323
356
import torch from torch import nn import torch.nn.functional as F from torch.nn import MSELoss def initialize_weights(m): if isinstance(m, nn.Linear): # nn.init.trunc_normal_(m.weight.data, std=0.1, a=-0.2, b=+0.2) nn.init.kaiming_normal_(m.weight.data, nonlinearity='relu') nn.init.constant...
4b987ed3c0b2f64010207a0bb48a84399cb37c54d18f0999e94dd087a8b500e2
Python
22,334
706
from __future__ import annotations from typing import ( TYPE_CHECKING, Any, Literal, Self, cast, ) import numpy as np from pandas._libs import lib from pandas._libs.tslibs import is_supported_dtype from pandas.compat.numpy import function as nv from pandas.errors import LossySetitemError from pan...
1b5aa752a2c84e42622462fc42f332ad939ca672cf964ce7b1f1576f70b23495
Python
22,354
504
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from scipy import stats from Bio.PDB.PDBParser import PDBParser from Bio import BiopythonWarning import json import os import sys import urllib.request import pickle import warnings warnings.filterwarnings("ignore") from colle...
795a5f57e717823ffcf0ed31c7f16fb8bdd17b567224dd1f323d156cd610b6dc
Python
22,369
743
"""Widely useful utility methods. """ from collections import OrderedDict from collections.abc import Iterable, Sequence from datetime import datetime import errno import functools import logging import math from numbers import Number import time from atropos import AtroposError # TODO: the nucleotide table should be ...
8b50fe032fcfa06d3839688f00284ba5ebd82e2db70780ab7aeea0f4698a30f3
Python
22,386
601
import warnings from warnings import warn import numpy as np import scipy.linalg import scipy.sparse import scipy.sparse.csgraph from sklearn.decomposition import TruncatedSVD from sklearn.manifold import SpectralEmbedding from sklearn.metrics import pairwise_distances from sklearn.metrics.pairwise import _VALID_MET...
615d4a6535eedf304bf7d82214eb984be78eb5b58e36c128ec9596781ab51b9e
Python
22,392
531
#!/usr/bin/env python """Module Description: Test functions of the refinepeak subcommand (MACS3/Commands/refinepeak_cmd.py), called directly and through ``macs3 refinepeak``. This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file LICENSE included with the ...
9c0ec754fcb161c2f88de4b110c6c322bc2d823b8780792e0c5f2ad123ea8f07
Python
22,406
686
from __future__ import annotations import re from typing import ( TYPE_CHECKING, Any, ) import numpy as np from pandas.util._decorators import set_module from pandas.core.dtypes.common import ( is_iterator, is_list_like, ) from pandas.core.dtypes.concat import concat_compat from pandas.core.dtypes.m...
c1d7f730639ec398315b5367a2d1c257fa8189df1bda56a7ac13b34531008dad
Python
22,407
621
from __future__ import annotations import functools from typing import ( TYPE_CHECKING, cast, overload, ) import warnings import numpy as np from pandas._libs import ( algos as libalgos, lib, ) from pandas.errors import Pandas4Warning from pandas.util._exceptions import find_stack_level from pan...
a7c12b9fd2cd256df96c33db2a42767c2965b08d22610b3201401d2e2a182210
Python
22,414
476
# Copyright (c) 2018-2023, NVIDIA Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
7ac92aec641bf0ef1170b1323f842e0f392a738c3e2721f5025ca86a399b5f80
Python
22,423
464
import os import glob import json import logging import torch import numpy as np from pybullet_utils import transformations from rsl_rl.utils import utils from rsl_rl.datasets import pose3d from rsl_rl.datasets import motion_util from legged_gym.utils.torch_jit_utils import * from legged_gym.utils.math import * cla...
7d13e10059bb075032d1681ceabb19599019740c254aa0e8b9a99d0ee1aaea3b
Python
22,431
581
from __future__ import absolute_import import collections import gzip import logging import os import sys import multiprocessing import threading import argparse try: import configparser except ImportError: import ConfigParser as configparser import numpy as np import pandas as pd from itertools import cycle...
4b7a613ddc1008860787d6c2d0c5266bde0f53bb4e4da5968d9bb47084c1e37e
Python
22,449
617
from typing import Tuple import torch from torch import nn from torch.nn import functional as F class EfficientSelfAtten(nn.Module): def __init__(self, dim, head, reduction_ratio): super().__init__() self.head = head self.reduction_ratio = reduction_ratio self.scale = ...
48268a718f24c0205df3a9f938d99e83a5446842a498f7f981973647f0725279
Python
22,450
421
import sys import os import argparse import numpy as np import pandas as pd import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt from cdr.config import Config from cdr.signif import permutation_test from cdr.util import filter_models, get_partition_list, nested, stderr, extract_cdr_prediction_d...
e306f8f36222d0dbf92c76b1bb66b64c09abd37f63a9762f6ccccccee9dc160e
Python
22,456
637
import inspect import os import warnings import pytest import pandas._config.config as cf from pandas._config.config import OptionError from pandas.errors import Pandas4Warning import pandas as pd import pandas._testing as tm class TestConfig: @pytest.fixture(autouse=True) def clean_config(self, monkeypat...
049c5774af3ee8ee98de92f8d8a3683e5042f236190e6e8a89b3bf9552f1051a
Python
22,468
413
#!/usr/bin/env python # -*- coding: UTF-8 -*- #coding=utf-8 from Bio import SeqIO import os, copy, math import os, threading from multiprocessing import Pool def cat_contigs(bin_folder, pwd): bin_length, bin_contigs_n, bin_contigs_5k, bin_avg_length, bin_n50_length, bin_contigs_position_list={}, {}, {}, {}, {}, {...
69ad64b869059fa3b0a7e90af243535ff5c79c88adcf3ec609cfc4e27974726f
Python
22,489
709
from __future__ import annotations from typing import ( TYPE_CHECKING, Any, Literal, Self, cast, ) import numpy as np from pandas._libs import lib from pandas._libs.tslibs import is_supported_dtype from pandas.compat.numpy import function as nv from pandas.errors import LossySetitemError from pan...
66a81d6cb7ddef5c2b6133cb1d1d7bd0e692f3b490b7aa43e4fdcc0ec8dab7c4
Python
22,498
500
#! /usr/bin/env python ############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this wo...
41038950c7c67929b876ff8bf60347f175588eb18280203500735d7f0a61c669
Python
22,518
504
# Copyright (c) 2023, NVIDIA Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions ...
4d4353d36bcfbcbfaf6d3ce5d4544f94ae7e3ba606ab45f9110f1ca3a4338044
Python
22,528
539
#!/usr/bin/env python3 """Regression tests for us_mpi_analysis. Each case builds an HPC job archive (synthetic data written by us_mpi_testdata plus an hpcrequest XML in the format the LIMS writes), runs us_mpi_analysis under mpirun and reduces the result archive to a JSON summary of every fitted model (RMSD and solute...
fc2896005a22cef99a3c67b4542405eea573e2759c8b6195296480dfb2be0b7a
Python
22,548
769
""" Tests that apply specifically to the Python parser. Unless specifically stated as a Python-specific issue, the goal is to eventually move as many of these tests out of this module as soon as the C parser can accept further arguments when parsing. """ from __future__ import annotations import csv from io import ( ...
07ccb08a75ad362fb46cbe97e1d1693848590ffaeb1b1fd3f5753df7c7a1cc2f
Python
22,577
647
# -*- coding: utf-8 -*- """ Copyright I3S CNRS UCA This code is an implementation of the statistical evaluation of the autoencoder described in the article : Learning a confidence score and the latent space of a new Supervised Autoencoder for diagnosis and prognosis in clinical metabolomic studies. When using this...
82b773e6bd374e570efe38990154e839bca341d02b1e03d2a1ac57721875029e
Python
22,593
769
""" Tests that apply specifically to the Python parser. Unless specifically stated as a Python-specific issue, the goal is to eventually move as many of these tests out of this module as soon as the C parser can accept further arguments when parsing. """ from __future__ import annotations import csv from io import ( ...
67e3c57407702d3a0fc214b6ad74a2783795205bc141273ddc7603b20d81bc68
Python
22,599
475
from tensorflow.python.keras.models import model_from_json from ImSetNorm import Normalize from scipy.stats import sem import tensorflow.python.keras as keras import pandas as pd import glob import cv2 import numpy as np import os import scipy import matplotlib.pyplot as plt import matplotlib class Anal...
ebd3882f3b80653167e91de8a023042d321b28f81c5cc7df2f6622eaf84d2947
Python
22,615
593
from datetime import datetime import numpy as np from pandas.errors import Pandas4Warning from pandas.core.dtypes.dtypes import CategoricalDtype import pandas as pd import pandas._testing as tm class TestCategoricalConcat: def test_categorical_concat(self, sort): # See GH 10177 df1 = pd.DataFr...
2101435ad9ff2e909d6f8eff3deda6d04eacbb5160552121250d6b15aec71545
Python
22,621
690
from __future__ import annotations import re from typing import ( TYPE_CHECKING, Any, ) import numpy as np from pandas.util._decorators import set_module from pandas.core.dtypes.common import ( is_iterator, is_list_like, ) from pandas.core.dtypes.concat import concat_compat from pandas.core.dtypes.m...
4424b706cb1e698886f92a4749647ee794d8be0e190127534f77bc65169df6f4
Python
22,639
561
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Nov 6 23:23:38 2021 This script is used primarily to retrieve useful information from PPMI for the XLS database. Together with *imaging_file_prunning.py*, it provides all necessary code to have PPMI ready to be uploaded to the cloud. Another part of t...
d847aa98b426daf9c818f5b1a16c497080341e144046bc06d0f03f8adfbc8db0
Python
22,642
613
# Copyright 2018-2024 Xanadu Quantum Technologies 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...
13a0dfc71af0f643166c88ff59f604bc309898220e02d65932d29fcd51e43d4e
Python
22,651
528
import os import numpy as np import torch import torchvision.transforms as trn import torchvision.transforms.functional as trn_F import cv2 from PIL import Image as PILImage import skimage.color as skcolor from skimage.util import random_noise from wand.image import Image as WandImage from wand.api import library as wa...
b81011ea62548c4fd904c0e9dfac65266646f6c9504aeaed01c00ca41a14ad19
Python
22,664
605
#!/usr/bin/env python """Module Description: Test functions in HMMR_Signal_Processing that split ATAC-seq fragments into short, mono-, di- and tri-nucleosomal signals and extract binned signals for the HMMRATAC Hidden Markov Model. This code is free software; you can redistribute it and/or modify it under the terms o...
be4a866c9e981ae332f524754c43859f0a25d0eceba8e3648b0ea0112a789445
Python
22,676
590
import re import numpy as np import pytest from pandas.errors import Pandas4Warning import pandas as pd import pandas._testing as tm @pytest.mark.parametrize( "msg,labels,level", [ (r"labels \[4\] not found in level", 4, "a"), (r"labels \[7\] not found in level", 7, "b"), ], ) def test_...
80b145ec850976628bb3a0be166757ae5629c68edf1ee5a0259756c2f7cba8ea
Python
22,685
674
"""Indexer objects for computing start/end window bounds for rolling operations""" from __future__ import annotations from datetime import timedelta from typing import TYPE_CHECKING import numpy as np from pandas._libs.tslibs import BaseOffset from pandas._libs.window.indexers import calculate_variable_window_bound...
13aac69b463c8f0db0409801989be342fb16e83318aa03bf81cb3df52e54ca72
Python
22,708
638
# Copyright 2018-2022 Xanadu Quantum Technologies 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...
8ebd2efa9248f889d2967d1fca120ccdf8851d09145483b54670bc34e3dddeb7
Python
22,715
692
import numpy as np import pytest from pandas.errors import Pandas4Warning import pandas.util._test_decorators as td from pandas.core.dtypes.missing import na_value_for_dtype import pandas as pd import pandas._testing as tm from pandas.tests.groupby import get_groupby_method_args @pytest.mark.parametrize( "drop...
d6c8201b295ed74249d2ab8e498e2e4a9ed3b157a7e76decbef8b030436db15f
Python
22,722
593
import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.core.algorithms import safe_sort @pytest.fixture( params=[ pd.DataFrame([[2, 4], [1, 2], [5, 2], [8, 1]], columns=[1, 0]), pd.DataFrame([[2, 4], [1, 2], [5, 2], [8, 1]], columns=[1, 1]), pd.DataF...
36bfc1beff4d0ba7f9fed4e18efa36425a962e8c67374ad2ee7924d92fae2459
Python
22,727
556
import argparse import os import shutil import sys import time import warnings from random import sample import numpy as np import torch import torch.nn as nn import torch.optim as optim from sklearn import metrics from torch.autograd import Variable from torch.optim.lr_scheduler import MultiStepLR from cgcnn.data im...
c405b68aa476c2899cbe8ad7265aac2501e3b77c5fb80235ec7185f002d53f3f
Python
22,749
535
import numpy as np import random import gymnasium as gym import torch from rl_games.common.segment_tree import SumSegmentTree, MinSegmentTree from rl_games.algos_torch.torch_ext import numpy_to_torch_dtype_dict class ReplayBuffer(object): """ Replay buffer for storing and sampling transitions. """ def...
70dc128aab9e41b5858d3c6e38bc80dcd9c39f34a4d63a83e975d904a55dfb50
Python
22,751
532
import os import numpy as np import torch import torchvision.transforms as trn import torchvision.transforms.functional as trn_F import cv2 from PIL import Image as PILImage import skimage.color as skcolor from skimage.util import random_noise from wand.image import Image as WandImage from wand.api import library as wa...
51c20eee679980b1503f32b630ab7195fe997d5b8d8d8c9d8ee250b54c0ad639
Python
22,777
536
import os import sys from subprocess import call import shutil import argparse from fiber_bundle_filters import matrix_dist_filtering, Consistency,ConsistencyValsFiltering, ConvexHullFiltering,distance_matrix_Dend, distance_matrix_SSPD import numpy as np import read_write_bundle as bt import time from joblib import Par...
d7b225fe86fba7c6bcf68913e7bc1616747eb53451f88b618999d0702b2ff6f4
Python
22,779
461
import argparse import os import sys import re import pickle import numpy as np import pandas as pd from sklearn.metrics import f1_score pd.options.mode.chained_assignment = None from cdr.config import Config from cdr.io import read_tabular_data from cdr.formula import Formula from cdr.data import add_responses, filt...
37b9c834cea6e0c9dc404fd630462b30b6dfc88e85c6eaed47952ec11a1a384f
Python
22,782
489
#!/usr/bin/env python3 # MIT License # # Copyright 2026 Broad Institute # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use...
3b02657e320c059e366c68ae5242c65f27542820905218b1adfae5cb4c63c7d0
Python
22,787
656
"""Data-source CRUD + CSV upload route. Mounted under ``/api/v1/workspaces/{workspace_id}/data-sources`` for listing and creation; ``/api/v1/data-sources/{id}`` for fetch + delete. CSV uploads land in ``${PYCARET_ARTIFACT_DIR}/data-sources/<uuid>.csv`` and the resulting ``DataSource`` row carries ``kind="csv_upload"``...
1a85035eb1655368f243e43517107fff7f24c4bb57828eae5d4dedacd4a4ddc8
Python
22,793
637
###################### ### Import Library ### ###################### # my library from molgraph.utilsonehot import * from molgraph.utilsmol import * from molgraph.utilsgraph import * # standard import numpy as np import copy as copy from tqdm import tqdm # rdkit from rdkit import Chem from rdkit.Chem import rdDepictor...
e8a52b005be8289ab252d06aa59675ac6e77776166c6e13338a7ea38a3e39b89
Python
22,801
507
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 10 10:28:02 2022 @author: wirrbel """ import pandas as pd import os import glob import re import tifffile import shutil import multiprocessing as mp import numpy as np import more_itertools import subprocess import datetime def atlas_align(mBrain...
69f5978f0994a02974721aeb327466d69eda23d5320ae12effbdcb2aa6c4f744
Python
22,854
604
# Copyright 2018-2022 Xanadu Quantum Technologies 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...
a872eacb69aa55839074b312d18054c8a8351eb1430a608b61c4e20a02050474
Python
22,883
715
import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.tests.apply.common import series_transform_kernels @pytest.fixture(params=[False, "compat"]) def by_row(request): return request.param def test_series_map_box_timedelta(by_row): # GH#11349 ser = pd.Series(pd.t...
07ffe00a7211d568ff9c94938bb619eb75200143a51a8abf1489f80f21c289d7
Python
22,902
533
import os import numpy as np import torch import torchvision.transforms as trn import torchvision.transforms.functional as trn_F import cv2 from PIL import Image as PILImage import skimage.color as skcolor from skimage.util import random_noise from wand.image import Image as WandImage from wand.api import library as wa...
75cc7813ecc5b8754852466222bfb6971ebdc37c544358ae908ab139dec01050
Python
22,911
632
import copy import warnings import dclab import numpy as np from ..idiom import SLOPING_FEATURES from .dataslot import Dataslot from .filter import Filter from .filter_ray import FilterRay from .plot import Plot class EmptyDatasetWarning(UserWarning): pass class MissingFeatureWarning(UserWarning): pass ...
bfb93117ce5c0c919d00468f4b031affb73fa12af91647505d68e666ec49a205
Python
22,921
617
from __future__ import annotations from datetime import ( date, time, ) from decimal import Decimal import re import numpy as np import pytest from pandas.core.dtypes.dtypes import ( ArrowDtype, ) import pandas as pd import pandas._testing as tm pa = pytest.importorskip("pyarrow") from pandas.core.arr...
c1c31be7c60c682cc2bf03bb534b3ce0f9cb30eb255584b88b768ccc5216704f
Python
22,934
682
from datetime import datetime import numpy as np import pytest import pandas as pd import pandas._testing as tm def test_rank_unordered_categorical_typeerror(): # GH#51034 should be TypeError, not NotImplementedError cat = pd.Categorical([], ordered=False) ser = pd.Series(cat) df = ser.to_frame() ...
39e3e8b2b5666f56b549f4bf5a63a6a1e79e1eb835a9f8494b94b9d8d03f256b
Python
22,969
565
# -*- coding: utf-8 -*- ''' SEGNASTIC_CLI COMMAND LINE (CLI) VERSION FOR SPATIOTEMPORAL INDEXING CLUSTERING OF MOLECULAR TRAJECTORY SEGMENT DATA Design and coding: Tristan Wallis Additional coding: Kyle Young, Alex McCann Debugging: Sophie Huiyi Hou, Kye Kudo, Alex McCann Queensland Brain Institute The University of Q...
80c5c81b514ab6aa6afea420b8e51ad759c588d483a9fef3fa7968f3609ecbe0
Python
22,977
504
"""Class for 3D->2D Projection Operator.""" import itertools import warnings from collections.abc import Callable, Sequence from typing import Literal, TypeAlias, cast import einops import numpy as np import torch from torch import Tensor from mrpro.data.Rotation import Rotation from mrpro.data.SpatialDimension impo...
1bf55f9d6a2322a31d67081592d02b54c9c894789d92672a18f56c8e33b4fdfe
Python
22,982
669
# Copyright 2022 Xanadu Quantum Technologies 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 agre...
b80a894ed7e47eb5a65c438498e48f95f49b98a20533ae323ba814de11c00e7b
Python
22,982
700
import numpy as np import pytest from pandas.errors import Pandas4Warning import pandas.util._test_decorators as td from pandas.core.dtypes.missing import na_value_for_dtype import pandas as pd import pandas._testing as tm from pandas.tests.groupby import get_groupby_method_args @pytest.mark.parametrize( "drop...
496202006c9b975e349cd9b98122b14a0bfdaa01e9750fa60cb731453d9844ab
Python
23,008
729
from __future__ import annotations from typing import TYPE_CHECKING import warnings import numpy as np from pandas._config import using_infer_freq_offset from pandas._libs import lib from pandas._libs.algos import unique_deltas from pandas._libs.tslibs import ( Timestamp, get_unit_from_dtype, periods_pe...
c99e44db70da7b2053e05dc79d14aba9de1458187d4416bd6811b767a0525706
Python
23,024
504
import argparse import os import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim from torch.utils.data import DataLoader from torch.autograd import Variable import torch.nn.functional as F import numpy as np import time import sys import cv2 from ply...
26d527bdcd909bdd2be58055dbabc74548483788926ba0142de39bed78527aba
Python
23,030
601
from collections.abc import Iterator from datetime import ( UTC, datetime, ) from decimal import Decimal import numpy as np import pytest from pandas._config import using_string_dtype from pandas.compat import is_platform_little_endian from pandas.errors import Pandas4Warning import pandas as pd import pand...
6b8a05804ffccaa399b7417aa09a69daddab7f53247ffb732d8a06a3392bd174
Python
23,060
611
import numpy as np import numba from sklearn.base import BaseEstimator from sklearn.utils import check_array from umap.sparse import arr_intersect as intersect1d from umap.sparse import arr_union as union1d from umap.umap_ import UMAP, make_epochs_per_sample from umap.spectral import spectral_layout from umap.layouts ...
c34eb76e76dae09db06a1917b64ff0b8ee71235a7873a7a361e80c4291016ed2
Python
23,069
451
# Copyright (c) 2021-2023, NVIDIA Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...