sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
78fd796a0ea73e3001df3b29d4a6fa97f89088101a4d5c42aaf995e4c9a671a0
Python
29,796
1,026
""" Tests the 'read_fwf' function in parsers.py. This test suite is independent of the others because the engine is set to 'python-fwf' internally. """ from io import ( BytesIO, StringIO, ) import numpy as np import pytest from pandas.errors import EmptyDataError import pandas as pd import pandas._testing a...
9524b7ad7e906a4684017c310cd9e66a9ebb631aaca3129d62cccdbf19e80f35
Python
29,816
665
# Copyright 2018-2021 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...
94f33662dfb2765b062620d00f43cf9777a3cd078d810d843a62e6767136920a
Python
29,823
763
"""Methods for decoding subsets of voxels or experiments into text.""" import numpy as np import pandas as pd from nilearn._utils import load_niimg from scipy import special from scipy.stats import binom from statsmodels.sandbox.stats.multicomp import multipletests from .. import references from ..base import Decoder ...
f1c7034e7988d5244933f2e4f9917f5143b5c6810b23f7a7cf34417804c3f0fc
Python
29,835
663
# My library from molgraph.dataset import * from molgraph.graphmodel import * from molgraph.training import * from molgraph.testing import * from molgraph.visualize import * from molgraph.experiment import * from molgraph.interpret import * from molgraph.fragmentation import * # General library import argparse import n...
3728fd1890aca5df2aaa482c91550f5431a59b4f0f7339e2683a09f3ff156722
Python
29,875
868
# 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...
10eac1acb66ee86fa63d9be04d3d1ce153f95b2ce491052a2e811a7303db99e5
Python
29,879
979
# Copyright 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 agre...
337cf8d694cd65d2f3f87843c86717f2ef466ca55690b7c00747ceb3a18f5ad2
Python
29,903
908
# 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...
32ec5704943a6572568eeddda4ad8af1a66f3f0ab00568de1ffd8aa84f66a10a
Python
29,906
898
""" Constructor functions intended to be shared by pd.array, Series.__init__, and Index.__new__. These should not depend on core.internals. """ from __future__ import annotations from typing import ( TYPE_CHECKING, Any, cast, overload, ) import numpy as np from numpy import ma from pandas._config i...
d4435c046a877026810fc3347d3d41cf86f7cac8601bfc4e978ea5cf8a00edcf
Python
29,958
810
"""Unit testing of conversion functions for parity transform""" import pytest import pennylane as qp from pennylane.fermi.conversion import parity_transform from pennylane.fermi.fermionic import FermiSentence, FermiWord from pennylane.ops import Identity, SProd from pennylane.pauli import PauliSentence, PauliWord fro...
ea2d8d24965fd1accf251f8ad3794e3001deef298f879258df4efd7b04191027
Python
29,966
678
"""Test pynvvc dataloading functionality.""" import logging import os import shutil import sys from unittest.mock import MagicMock, patch import pandas as pd import pytest import torch import lightning_pose as lp from lightning_pose.data import _IMAGENET_MEAN, _IMAGENET_STD from lightning_pose.data.video import utils...
d31592c49642a29b8c08f6b3788d63570de4db2bfd43a41ff3fbd03b007a95d4
Python
29,967
601
import numpy.linalg as LA import numpy as np from .bfgs import bfgs from . import gaussianDiffeons as gd from . import conjugateGradient as cg, kernelFunctions as kfun, surfaces from . import pointEvolution as evol from . import surfaceMatching from .surfaceMatching import Direction from .affineBasis import AffineBasis...
caa60d7261c8ac82898d57dfbe57779add3df10773e7c1534ad28e255351a3c1
Python
29,982
893
import numpy as np import pytest import pandas as pd import pandas._testing as tm class TestDataFrameSubclassing: def test_no_warning_on_mgr(self): # GH#57032 df = tm.SubclassedDataFrame( {"X": [1, 2, 3], "Y": [1, 2, 3]}, index=["a", "b", "c"] ) with tm.assert_produces...
7d1660cf879a5786f82e7d3c9171c39e6e00b6217ad5be27996d94037186ce44
Python
30,014
789
from datetime import datetime import re import numpy as np import pytest from pandas.errors import OutOfBoundsDatetime import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm from pandas.core.arrays import IntervalArray class TestSeriesReplace: def test_replace_explicit_none(...
24de3cdc3f7c0dee3f7287bd9d00a818e39e4a15ca60c4109a43cbf6aa975986
Python
30,048
923
"""Helper functions for accessing data.""" from __future__ import annotations import json from collections.abc import Collection, Sequence from importlib.util import find_spec from typing import TYPE_CHECKING, TypedDict, overload import numpy as np import pandas as pd from anndata import AnnData from numpy.typing im...
f04414d55972cdefa6d67786d4d62f17181a29360bab1ae4da99157caba63169
Python
30,053
712
import copy import numpy as np import twixtools from twixtools.recon_helpers import ( remove_oversampling, calc_regrid_traj, perform_regrid ) # define categories in which the twix data should be sorted based on MDH flags # that must or must not be set (True/False) # only one 'any' per category allowed (...
4a4762359eb22ee68f1dd85af4255ecf66bb1656c202aa3a9c485fc34a2fe934
Python
30,059
689
# Copyright (c) 2012-2021, NECOTIS # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, # this list of conditions and th...
c819888c5b348b3eabb1e0835e2d08c5b382396428d7999b0764aacae24e7f43
Python
30,063
969
from initialization.config import * from initialization.initialization import * from data_processing.cleaning_formatting_filtering import * from data_processing.shape_calculations import * from data_processing.statistics import * from data_processing.time_calculations import * from visualization.trajectory_visualizat...
6814353ebac947284f7f2ec10d6fe2d3f24dbfebc5f44ab52f045480455077ef
Python
30,064
774
from datetime import ( datetime, timedelta, ) from importlib import reload import string import sys import numpy as np import pytest from pandas._libs.tslibs import iNaT from pandas.errors import Pandas4Warning import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm def r...
f233cab9154856f9408e65549ee9c82197dc874e0bc821606ba36201c01cf5e3
Python
30,099
803
""" Visualization of mutation effects Authors: Thomas A. Hopf Anna G. Green (mutation_pymol_script generalization) """ from math import isnan from copy import deepcopy import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from bokeh import plotting as bp from bokeh.core....
41a0c619da4bd7bb1cb6d1fedf6959ddeddbc372e8d0d4b02b974dd74645ebe9
Python
30,104
710
# 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...
3935507981f0e50bca375ca8966d69f63121ce47418827e82705a0bcd6cb1646
Python
30,158
675
import torch import torch.nn.functional as F import dgl import dgl.function as fn from dgl.nn.pytorch import edge_softmax from dgl.nn.pytorch import WeightAndSum import itertools import torch.nn as nn import numpy as np import pandas as pd #All possible graphs (can't handle peptides longer than length 30 or shorter th...
c87cbef318c82655c63470beba5d54dda1f51b9150b995efa1055d512796f1a0
Python
30,177
790
import re import unicodedata import numpy as np import pytest import pandas.util._test_decorators as td from pandas.core.dtypes.common import is_integer_dtype import pandas as pd import pandas._testing as tm from pandas.core.arrays.sparse import SparseArray try: import pyarrow as pa except ImportError: pa ...
d9bbff7db93731a45b336e9a3ee2b07a9558110a2a40f1dd700c33840a7392ed
Python
30,204
853
# Copyright 2020-2023 Xupeng Chen, Ran Wang # # 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 to ...
240ade47eccd548caea2b925903f542ff60bc335a40243876c39a322e32e511b
Python
30,247
939
# Copyright 2018-2021 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...
01890947533c91cf15dd64242fd53e64c1e79ee6ad9e87a9219bd87674602731
Python
30,288
902
# Copyright 2021 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...
7a4f8737b44bfa2a9b2761b250f793c135b33ea955a80eb5c058634bf7d62069
Python
30,299
482
#! /usr/bin/env python import argparse import os import pysam import pandas as pd import numpy as np from scipy.optimize import nnls import scipy.sparse import multiprocessing as mp from hashed_read_genome_array import HashedReadBAMGenomeArray, ReadKeyMapFactory, read_length_nmis, get_hashed_counts from plastid.genomi...
6e0be2b035a1889fb4a0dbf9731e170a20de399d5a34575a1488b586f106d07d
Python
30,324
587
import logging import time import gc import matplotlib.pyplot as plt import statsmodels.api as sm import numpy as np import torch import torch.nn as nn import torch.utils.data as data from scipy.stats import ttest_rel from tqdm import tqdm from ema import EMA from model import * from pretraining.dcg import DCG as Aux...
2c4972503f320d6720515c94a5123f693ed8729d198dec19079529aa97a4f98a
Python
30,331
1,217
#funcsboot.py from placerg.funcs import * from placerg.funcsrg import * from placerg.funcsall import * from placerg.objects import * from scipy.optimize import curve_fit def bootfunc(a, env): rate=[] coeff=[] eigspec=[] var=[] psil=[] actmom=[] autocorr=[] tau=[] ...
e2fc4bb4966e9859e14b64f76115e71e8192144d2bf76cbf6a86da70bdb9ac0e
Python
30,355
780
import nibabel as nib import numpy as np from traits.api import HasTraits , CArray, Instance,on_trait_change from collections import OrderedDict import logging import json import interpolator import re log = logging.getLogger() class PylocModelException(Exception): pass class Scan(object): def __init__(sel...
9206b9be093e2c9ddb6cd9a9010e05bc66b3208b50a5b50afde3369f8ef9bee2
Python
30,420
663
#migration_calculations.py from initialization.config import * from initialization.initialization import * import os import numpy as np import pandas as pd from tqdm import tqdm def cell_delta_calcs(cell_tarray, t_window=MIG_T_WIND, debug=False): ''' Calculate delta x, delta y, delta z, and directionality i...
8a3fbf9b25ca47d2f6cf8ed6e23d747fa2b43a5f194c0ef7d4f91808f9254b19
Python
30,421
1,005
import decimal import re import numpy as np from numpy import iinfo import pytest import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm @pytest.fixture(params=[None, "raise", "coerce"]) def errors(request): return request.param @pytest.fixture(params=[True, False]) def si...
c9f44495c87940b84808713c27ec00f5e5a30569b80f6eca03e0721dd214e2c1
Python
30,434
692
# 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...
f8df6250305890ef7b0de67707eb12322c641549c34d59bc4669fc9b505bb3ff
Python
30,440
864
# cython: language_level=3 # Time-stamp: <2024-10-07 16:09:06 Tao Liu> """Utilities for reading BAM files and their BAI indexes in MACS3. 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 distribution). """ # --------------...
20385952f22a8f43a344272b482e1ca7555c4b136270b3edfd6649e57da825a9
Python
30,453
825
from datetime import ( date, datetime, time, timedelta, ) import numpy as np import pytest from pandas.errors import Pandas4Warning import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm from pandas.tseries.frequencies import to_offset START, END = datetime(2009,...
ad876f3a639dc4ca167d667b1a7e7bb84011ece4509a079673a70cf5cbfbb4c1
Python
30,463
875
# Copyright 2018-2021 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...
e716cba53aa38eb7fcac69a84db6ee7304a8bfd0785484ee69f6640a12c1584f
Python
30,476
780
import multiprocessing import os import shutil import tempfile from collections import Counter from functools import partial from typing import List, Optional, Set, Tuple, Union import ngs_tools as ngs import numpy as np import pandas as pd import pysam from typing_extensions import Literal from .. import config, uti...
a71ec4b0c556c37b975a4441f8e99c19346a703e63212f8332bcb2c092d05653
Python
30,487
814
# 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 ...
565243c14e7724d7bde6cb8f884378d796aa9200db8a5e014476ab339441c22e
Python
30,498
755
# 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...
6d38c06a140801dc7b0f356b439bdd52c9fa8efd645eed104283de34281a9dd5
Python
30,506
710
# -*- coding: utf-8 -*- """ Created on Sun Apr 16 18:11:11 2023 @author: lonya """ #%% Load Data import tkinter as tk import tkinter.filedialog as fd import numpy as np import os import matplotlib.pyplot as plt import pandas as pd import my_funcs as mf import seaborn as sns from scipy.stats import sem from scipy.stats ...
6cfdc27d25e43cbfcc39867cd7d31e63291ef4305a94abccf49b18aa83ce5347
Python
30,546
834
""" Tests for the pandas.io.common functionalities """ import codecs import contextlib import errno from functools import partial from io import ( BytesIO, IOBase, StringIO, ) import mmap import os from pathlib import Path import pickle import re import sqlite3 import tempfile import numpy as np import py...
0363e68309d55b8663009622be3d662fdd81e9d9bbd2fae456e4ea8cfd62232a
Python
30,583
826
"""test the scalar Timedelta""" from datetime import timedelta import numpy as np import pytest from pandas._libs import lib from pandas._libs.missing import NA from pandas._libs.tslibs import ( NaT, iNaT, ) from pandas._libs.tslibs.dtypes import NpyDatetimeUnit from pandas.compat import WASM from pandas.com...
7f0aa142cb350908417243a6f5a92024cad0626f20ab4b061fd7091ebb134b59
Python
30,598
734
''' Created on Aug 15, 2016 @author: arco ''' from __future__ import absolute_import import os, random, string, threading import contextlib import shutil import tempfile import datetime import cloudpickle as pickle import yaml if 'ISF_MDB_CONFIG' in os.environ: config_path = os.environ['ISF_MDB_CONFIG'] wit...
42cdd6e533a54ae5d0481ed188181f1c78bedd566cfd92b24d885b45eea6e126
Python
30,630
1,014
""" Inference of evolutionary couplings from sequence alignments using mean field approximation. Authors: Sophia F. Mersmann """ import numpy as np import numba from copy import deepcopy from evcouplings.align import parse_header from evcouplings.couplings import CouplingsModel # arbitrary value that is written #...
f47df32b5bf33092d6f19be137b798381c251c76e52958eb06c3af0cea245c75
Python
30,636
806
# 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...
7a8eb2a451bccd53f8691d8c8b49e19f221f551b5a33f10b2ca8c3c723351585
Python
30,639
661
#! /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...
460fff1be85e84017189aa35ce2d926b55d890eb970b83b7991843f308b485a6
Python
30,641
765
#!/usr/bin/env python # Time-stamp: <2025-09-29 14:18:42 Tao Liu> import re import struct import unittest from collections import Counter import pytest from MACS3.IO.BAM import BAIFile, BAMaccessor from MACS3.IO.BAM import (StrandFormatError, MDTagMissingError) class Test_BAIFile(unittest...
c07e2347d06afbf6c8ae53223814d5590a5c1d8e910a48a1e563e9eec6bc31f5
Python
30,664
803
"""Functions for predicting keypoints on labeled datasets and unlabeled videos.""" from __future__ import annotations import datetime import gc import logging import os from pathlib import Path from typing import TYPE_CHECKING, Any, Literal, cast, overload import cv2 import lightning.pytorch as pl import matplotlib....
aef83dcbc69080127c05dbcfd7ff4aff82cf071791036b4d2459b5a030417932
Python
30,707
732
#! /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...
98abb1af5756fd7fcbb8388aba50851fc65092561fc907bb6ec0bcf74c894e0c
Python
30,777
1,056
""" Tests the 'read_fwf' function in parsers.py. This test suite is independent of the others because the engine is set to 'python-fwf' internally. """ from io import ( BytesIO, StringIO, ) import numpy as np import pytest from pandas.errors import EmptyDataError import pandas as pd import pandas._testing a...
d03c585d9ac4493fc213ea0204ed8dc5f6b517ffd8604c989f38245da174bae3
Python
30,787
811
from initialization.initialization import * from initialization.config import * from data_processing.cleaning_formatting_filtering import * from data_processing.migration_calculations import * from data_processing.load_trackmate import * # from data_processing.shape_calculations import * # rah import os import numpy ...
c26155306a299a689fddfd45160f46a8c3e15457a0c43b8584a3d732d508a526
Python
30,804
433
""" Module for implementation of developmental models """ import abc import os import numpy as np from glob import glob1 from scanometrics import __version__ from scanometrics.utils import logging from scipy.stats.mstats import mquantiles from scipy.stats import norm from scipy.stats import f as fstat from scipy.sta...
6dee0f9f93607c5692f19c0f3d43ee9695030cb77292a434cf63d2ba101b6835
Python
30,810
739
# Copyright 2018-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...
f66dfb0d71ff8959c3d0da29a660afb32aad725e3dd22af99e5190fc37c8ed79
Python
30,816
922
import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.api.types import CategoricalDtype import pandas.core.reshape.tile as tmod def test_simple(): data = np.ones(5, dtype="int64") result = pd.cut(data, 4, labels=False) expected = np.array([1, 1, 1, 1, 1]) tm.a...
eba07c9cd299838fb16f30673346eda3936560f103a8d17514f4e7b1a1dc3e68
Python
30,819
601
###################### ### Import Library ### ###################### # my library from molgraph.graphmodel import * # from molgraph.graphmodel_star import * # from molgraph.graphmodel_signed import * from molgraph.dataset import * from molgraph.experiment import * # general import math as math from tqdm.notebook impor...
51e1d9061e20a0a4d367aeb7e262ffcfbda251e5e609bee233f7ef3d58ab97d9
Python
30,849
819
import re import numpy as np import pytest from pandas.errors import InvalidIndexError import pandas as pd import pandas._testing as tm class TestGetItem: def test_getitem(self, closed): idx = pd.IntervalIndex.from_arrays( (0, 1, np.nan), (1, 2, np.nan), closed=closed ) asse...
5d6882d83f70f39e5e247a82ada9928746b154de9942eda4acbfa8ddef7038f7
Python
30,856
899
# 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...
6582d0a19a6fbca2dc72d417f870ea6bce2b8a4c9ea70fa346d58811f4eb01fc
Python
30,875
786
"""Test cases for DataFrame.plot""" import string import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.tests.plotting.common import ( _check_axes_shape, _check_box_return_type, _check_legend_labels, _check_ticks_props, _check_visible, _flatten_visible,...
385c3514f2854df032f89477610a8658336630842230af8bc2891d78e300f618
Python
30,876
855
# 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...
04bc9daf839bd666267735e181728ae40398d08cdacebe4ecd8f56d6e4a4cc27
Python
30,878
867
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. --- MIT License Copyright (c) 2021 www.compscience.org Permission is hereby granted, free of charge, to any person obtaining a copy of this so...
ca80f9a3234b05c99e0cc0a0d5527f2012e1635b62a8e0f81da2505858471f58
Python
30,878
559
# ------------------------------------------------------------------------------------------------------------------------------------- # Following code curated for GCPNet (https://github.com/BioinfoMachineLearning/GCPNet): # ----------------------------------------------------------------------------------------------...
56d53ca8b147b449068dec27d504c053d3f40dcc88260f1c194b07a95b96909c
Python
30,897
924
from __future__ import annotations import numpy as np import pytest from pandas.compat import HAS_PYARROW from pandas.errors import Pandas4Warning import pandas.util._test_decorators as td from pandas.core.dtypes.astype import astype_array import pandas.core.dtypes.common as com from pandas.core.dtypes.dtypes import...
405a4e3e3c45bb9114a70ebbbb85bfc2e2fbc7964886527b8e10d95bb967dba1
Python
30,899
786
"""Test cases for DataFrame.plot""" import string import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.tests.plotting.common import ( _check_axes_shape, _check_box_return_type, _check_legend_labels, _check_ticks_props, _check_visible, _flatten_visible,...
3bad897fbf675da2d1e7a26bf343100a17d26f4e797c70c40c5c9ce4d706bbf3
Python
30,932
832
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import datetime import errno import logging import os import random import subprocess from abc import ABC, abstractmethod from collections imp...
b09582a9cfae66c07b483e321350c33e3d0fa4c13d03c5f04998a75718a86008
Python
30,935
824
# Copyright 2025 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...
c38de9cd811a6986723ba25558589107fc057a7ee983b1e20f0ae2a5e0b17603
Python
30,936
926
from __future__ import annotations from typing import Any import numpy as np import pytest from pandas.compat import HAS_PYARROW from pandas.errors import Pandas4Warning import pandas.util._test_decorators as td from pandas.core.dtypes.astype import astype_array import pandas.core.dtypes.common as com from pandas.c...
3ad65d6faf7b9bde06973e66ec311648fb45a6dad4ed9ff64eb48ff46aa3b3bb
Python
30,961
664
# Copyright 2018-2021 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...
15db26eb68074c3798ffcff4d5a82ef8eef373411fa68fed952163f43980fc7d
Python
30,968
932
# Copyright 2018-2020 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...
4a6dcff3173acb4129bd38106c09348a5f35c9bf48c2e7b2b468972abf45e71d
Python
30,975
897
from collections import namedtuple from collections.abc import Generator from contextlib import contextmanager import re import struct import tracemalloc import weakref import numpy as np import pytest from pandas._libs import hashtable as ht import pandas as pd import pandas._testing as tm from pandas.core.algorith...
e4f352a05d56d8c2e12bda529bd61c144be621ec80db9a360a360bc8d303c21b
Python
30,985
701
# 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...
0fc95e3155ea69a51543467115d0ad87e3d595cfb2fd51994020b4a4cf71597f
Python
30,986
873
# Copyright 2018-2021 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...
0428adb463607ebb339f48f8c67e9e9b935de2150fc7ba791a7ef624c6ef2eec
Python
30,998
659
import json import pickle, gzip import numpy as np import matplotlib.patches as mpatches import matplotlib as mpl from matplotlib import pyplot as plt, cm from scipy.optimize import curve_fit from neuron import h, gui from scipy.stats import f_oneway, tukey_hsd, ttest_ind_from_stats plt.style.use('seaborn-colorblind')...
8c3dbbf8dcb94b1605e75bab04c21d7e83d9bf012f951d86a28591b2f63ef6ab
Python
31,028
738
# Fast protein structure searching using structure graph embeddings # faiss and biopython imported in functions import torch from torch.nn import Dropout, Identity, Linear, Sequential, SiLU from torch.nn.functional import normalize from torch.utils.data import Dataset from torch_scatter import scatter from torch_geome...
50ec892e682df989ec8360ce36cd2c9ebec6fbf14c741b0aa410d63852e7c2a3
Python
31,092
483
#! /usr/bin/env python import argparse from Bio import SeqIO from plastid.genomics.roitools import Transcript, SegmentChain import re from collections import defaultdict import pandas as pd import numpy as np import multiprocessing as mp import subprocess as sp import os import sys from time import strftime parser = ...
803d05ec5073dc29ed086e26982695a015ed6093635ee56264e11eab6b398c47
Python
31,097
678
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Step S2 (CheckM2 branch): Bin abundance estimation and PE connections. This module computes coverage-based abundance information and paired-end connections across bins using multiprocessing, preparing inputs for downstream dereplication and comparison steps. """ from...
d18b731da015306968e1a558aeb487943384b232b77aa4764438b9533ce33af1
Python
31,125
742
# 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...
75373d2c23fcb0987fa8b4a6381023d3de775d5d023a3fde9916d4e8773be8e7
Python
31,138
549
# Copyright 2019 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany # # 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://w...
38f4c679549fe1f4ef66870894806390c43fdebf0fbeda3519551ee85d31744d
Python
31,142
799
# Copyright 2025 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...
2cd25f2eaa8fd317842dccbbc6eb1cddbd922a7775e5dd1e38b12cf071867d38
Python
31,160
876
# Copyright 2018-2021 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...
0a141bf9945cdc86876a4d2b7e4f26fe563a1e8cdbd4a48a1f5977cf54f5bae0
Python
31,171
869
from collections import deque from datetime import ( date, datetime, time, timedelta, ) import re import string import numpy as np import pytest from pandas.errors import Pandas4Warning import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm from pandas.arrays impor...
cd6f1728970d26828342110fdd23d2bf12ee07012551e1f0aeb2f474df967c3d
Python
31,185
938
"""Utility functions for NiMARE.""" import datetime import inspect import logging import os import os.path as op import re from functools import wraps from tempfile import mkstemp import nibabel as nib import numpy as np import pandas as pd from nilearn.input_data import NiftiMasker from . import references from .due...
299c8524411dd271e039c3cae9418a4342f99502d90d34e007eb1c8a4232bb17
Python
31,196
675
"""Tests the Spatial class.""" import pytest import torch from mrpro.data import SpatialDimension from mrpro.utils import RandomGenerator from typing_extensions import Any, assert_type def test_spatial_dimension_from_xyz_int() -> None: """Test creation from an object with x, y, z attributes""" class XYZint:...
4b48d20ce5a99a33be245a220556e7c3e64410b9ef55ac4238053c388dd1751a
Python
31,258
856
from datetime import datetime from itertools import product import numpy as np import pytest from pandas.errors import Pandas4Warning from pandas.core.dtypes.common import ( is_float_dtype, is_integer_dtype, ) import pandas as pd import pandas._testing as tm @pytest.fixture def multiindex_df(): levels...
c10a70704bef9582e800ef8b8bc7c432cf846ee836b62f1dc742133c1ab8ab5f
Python
31,264
832
# 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...
4fed9f6b4821b247ca814ebf3646fb364a99e5f02a2b3a394bd51eb2d5a40b4a
Python
31,293
817
# 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...
2857600957e1b4e704a78b61efc5deb32e07d379930243c0f501b4b79ef38fb7
Python
31,299
819
"""Implementation of the 'trim' command. """ from collections import defaultdict from collections.abc import Sequence import logging import sys import textwrap from atropos.commands.base import ( BaseCommandRunner, Summary, Pipeline, SingleEndPipelineMixin, PairedEndPipelineMixin, ) from atropos.com...
882edf070211d23318ea0ca3e5701c79686d14e07636dfed63cdd39cf8230bb9
Python
31,302
900
from __future__ import annotations from datetime import ( datetime, timedelta, ) import numpy as np import pytest from pandas.compat import ( IS64, is_platform_windows, ) from pandas.errors import Pandas4Warning import pandas as pd import pandas._testing as tm ######################################...
40909abedf412caf1f58876ba9b04e1a129c7e9e5dd69cfc73be407940cd6c5c
Python
31,308
637
import argparse, os, sys, time, gc, datetime from torch.functional import norm import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.distributed as dist from torch.utils.data import DataLoader from torch.utils.tensorboard import Summa...
b8db96d14a7ac7845dff648a67a468fd86d82ebd82fbd40f0cf41a65117b67a7
Python
31,311
660
# -*- coding: utf-8 -*- import torch import numpy as np from collections import defaultdict from sdna.sim import * BASE_REPRESENTATION = {(-1.0, -1.0): 'A', (-1.0, 1.0): 'G', ( 1.0, -1.0): 'T', ( 1.0, 1.0): 'C'} NUMBER_REPRESENTATION = {'A': (-1...
0329aa47ca03076b43726a6f06c20b00089eabc91162f89a5f993c573152b222
Python
31,323
796
import os from copy import deepcopy from numbers import Integral import anndata import numpy as np import torch from scipy import sparse try: import cupy as cp CUPY_AVAILABLE = cp.cuda.is_available() except Exception: CUPY_AVAILABLE = False import gc from ..models._base_models import pyagingModel from ...
4fc71f65163e907257485ddfb267a52e1b44ed329ca94c9534c19e522c983d5c
Python
31,329
938
""" Constructor functions intended to be shared by pd.array, Series.__init__, and Index.__new__. These should not depend on core.internals. """ from __future__ import annotations from typing import ( TYPE_CHECKING, Any, cast, overload, ) import warnings import numpy as np from numpy import ma from ...
5cbe8aaa40edee8563d8cdefd0d1170957133c31ca2b72991431719c3070f57e
Python
31,330
901
from __future__ import annotations from datetime import ( datetime, timedelta, ) from typing import Any import numpy as np import pytest from pandas.compat import ( IS64, is_platform_windows, ) from pandas.errors import Pandas4Warning import pandas as pd import pandas._testing as tm ###############...
b2ba34c2dd706337f1e7169cacc4932904fb648fc8de23108a2b33d098d5caca
Python
31,376
873
""" Tests dtype specification during parsing for all of the parsers defined in parsers.py """ import csv from io import StringIO import numpy as np import pytest from pandas._config import using_string_dtype from pandas._libs import parsers as libparsers from pandas.errors import Pandas4Warning from pandas.core.dt...
3fbd3762c208ecbd3865f6dc835f63eda8d395a81ba42c240d8cdd65b4be8581
Python
31,384
532
import sys import matplotlib.pyplot as plt import matplotlib.colors as colors from eLife_Grid_anchoring_2024.vr_grid_cells import * from eLife_Grid_anchoring_2024.Helpers.array_manipulations import * import eLife_Grid_anchoring_2024.Helpers.plot_utility as plot_utility warnings.filterwarnings('ignore') def min_max_n...
643968c7c0502c6d6adfc82a7cfa6728c6195a85bf6c1b4ef58e7a0b0509d0d5
Python
31,392
656
#!/usr/bin/env python from __future__ import ( print_function, division, unicode_literals, absolute_import, ) from builtins import str import os import os.path as op import numpy as np import nibabel as nb import warnings from nipype.interfaces.base import traits, TraitedSpec, InputMultiPath, File,...
1dc8cd7af79452fe6803525cadf91169628c26d90a032872fcca2982df8fd216
Python
31,404
569
# Copyright 2018-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...
44577a35ad1d4c8c5c127b3b315cd9719d8f2a12d48b37207fae90b944d0833b
Python
31,406
798
"""Test cases for .boxplot method""" from __future__ import annotations import itertools import string import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.tests.plotting.common import ( _check_axes_shape, _check_box_return_type, _check_plot_works, _check_tic...
70f572618891e21b6e6f6176a8a508b54f666d082025a011400aac41c5955e60
Python
31,419
699
import torch import torch.nn as nn from torch.nn import init import functools from torch.optim import lr_scheduler import os import numpy as np import scipy.io as sio ############################################################################### # Helper Functions ####################################################...
313e2dc1dd7347b0da9673d9bccf9e017d4ca91dd6317d60aba5cbb18a9b99fd
Python
31,444
853
""" Tools for working with AQuA event features Designed to accompany the paper "Network-level encoding of local neurotransmitters in cortical astrocytes" (DOI: TODO) """ ## ------------------------------------------------------------------------ ## ## Imports ## ------------------------------------------------------...
744ae919f2de06f636129edc8c3f5bd3c1edff67fb608e423613b60c5e340150
Python
31,453
680
import codecs from contextlib import closing import requests import csv import itertools import statistics import random import collections import copy import math import pprint as pp import seaborn as sns import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap import numpy as np imp...
ae10e50535847ed0dfa551488c8926bbead881df1d3f1ace50ae0180b70ba88e
Python
31,462
858
"""Detect adapter sequences directly from reads based on kmer frequency. """ from collections import defaultdict import logging import math import re from atropos.align import Aligner, SEMIGLOBAL from atropos.commands.base import ( BaseCommandRunner, Pipeline, SingleEndPipelineMixin, PairedEndPipelineMixin) from at...