sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
ffe7db97468071e536aec16c8453e44d62d0b84b19fc9dad8a4cac66973564ba
Python
39,490
951
# 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...
dd1387c6527c171650acd1344678d705915ca8499955e4019d9cf05375263fd5
Python
39,502
1,176
""" Tests dtype specification during parsing for all of the parsers defined in parsers.py """ from collections import defaultdict from decimal import Decimal from io import StringIO import numpy as np import pytest from pandas._libs import lib from pandas.compat.pyarrow import pa_version_under25p0 from pandas.errors...
9d53261828f0ed0f78d48c7399c4ea6b6228bc2d68e4592a27828062039265d2
Python
39,542
1,102
import csv from datetime import ( UTC, datetime, ) import io import os import sys from zipfile import ZipFile import numpy as np import pytest from pandas.compat import is_platform_windows import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm from pandas.core.arrays impor...
05735dbbd4936113c602a2031499c8760dd32c395dc3c2c3fe76fb56fb92e31b
Python
39,568
1,027
#---------------------------------------------------------------------------- # Functions and Classes import struct import sys from numpy import loadtxt import numpy as np import copy def initOnsetSpikes(): model.ncAMPAlist[0].event(data.st_onset * 1000) def initSpikes(): if (len(data.etimes)>0): for ...
abd0b9024579c491dac4548496630c84d8c86c6e4244600480fca7f3ddb483c9
Python
39,608
997
# Copyright 2018-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...
c6a5a2a307bf6fa43607b9d15d7a622a504eac2a919a289cb02b6980ad40fa7c
Python
39,631
1,075
""" 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 t...
b888bf857da850ae35e916a23aa7a143f6197401986497c08d0a4ab339a759c2
Python
39,652
1,105
# cython: language_level=3 # Time-stamp: <2025-11-10 15:24:27 Tao Liu> """Module for FWTrack classes. 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). """ # ------------------------------------ # python modu...
eddf20f59dee594bedb5ba5950ae53660670fd5f6e326581083bae8fad439dad
Python
39,684
961
# 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...
a06cdbdfe9c2ef77ab493ab8e36d3c272f47c795e2b1d37882b94a00bef12229
Python
39,724
1,048
# 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...
b1860c88c18497305b3c224fc1be7b8d1c8c7bd03aeb394e5025240fa48e5f90
Python
39,749
1,196
from datetime import datetime from io import StringIO import itertools import re import textwrap import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd import pandas.io.formats.format as fmt lorem_ipsum = ( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...
994b44e8de8a2ac498621f27bedb50528d79bb4bfdff0bad77b1d70b85caf68d
Python
39,827
1,075
import os os.environ['ETS_TOOLKIT'] = 'qt4' from pyface.qt import QtGui, QtCore from model.scan import CT from slice_viewer import SliceViewWidget from mayavi.core.ui.api import MayaviScene, MlabSceneModel, \ SceneEditor from mayavi import mlab from traits.api import HasTraits, Instance, on_trait_change from trai...
a19e946cf1a5f9e5129b8879df24f3d5f6cfe3977afb74be1967b50fd6d92e22
Python
39,833
1,009
#!/usr/bin/env python """Module Description: Test functions for pileup functions. 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). """ import unittest import numpy as np from pathlib import Path from tempfile...
92fa2a0992bc8c5acdfe0f0c5e7cc79f5e3ad3a6a5872086390fddaf70edc76c
Python
39,854
1,076
# 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...
a1f28a65ffec563e67ec6156d6910a35e9e295535a35fdda0c71e1e1ee76f305
Python
39,859
1,135
import numpy as np import pytest from pandas.errors import Pandas4Warning import pandas as pd import pandas._testing as tm class TestDataFrameSortIndex: def test_sort_index_and_reconstruction_doc_example(self): # doc example df = pd.DataFrame( {"value": [1, 2, 3, 4]}, ind...
d8d3d0a91105b8257048e1bb847533a7f7dc0fc238a4018b2c582fff21b4745f
Python
39,893
1,096
# 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...
e3ee73e3a9e484ddefc83a17fcf632bfb73123dd73c5e67ac05e9df69e8604fe
Python
39,900
1,080
# 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...
0b963f5476eb1b3f3a40f1e4e273a9d98a91e66c34b79198d94c3b0c024c3808
Python
39,914
1,078
# 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...
7618b5a17310933a25fce494ead613e0dcec3af0dd770b4785a563de3de9f22f
Python
39,959
1,154
# 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...
1d213bfa762b0799233a9d532e8261ec2f9892aaf11dccef7580213755d8991c
Python
40,037
1,018
import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.core.arrays.sparse import SparseArray class TestReductions: @pytest.mark.parametrize( "data,pos,neg", [ ([True, True, True], True, False), ([1, 2, 1], 1, 0), ([1.0, 2....
eb591c2e7fb07bbbfd8cbdcd7879d1602f13135a519c645711b96d991c859ccb
Python
40,053
1,176
""" 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 ast import collections import copy import importlib import itertools import json import logging import os import sys import time from ...
1dc8bb4ad90978e4943302506564eb8dc969a45ae9ad61e7f93d3769cb63a5fd
Python
40,203
1,256
from math import ceil from typing import Any, Dict, List, Optional, Tuple, Union # matplotlib removed from core deps in 4.0.0a1 (time-series plots use # plotly primarily; matplotlib paths are residual). try: import matplotlib import matplotlib.pyplot as plt except ImportError: # pragma: no cover matplotli...
4fc83ead090ddbefb950aa3d338aa0b140a3717ece317d61bfe774919be563eb
Python
40,366
1,027
# 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...
b3381b284ba63ce8543b55e819a89bc9371f3613214e4307dd7401a2594f0432
Python
40,368
1,121
from collections import ( abc, deque, ) from collections.abc import Iterator from datetime import datetime from decimal import Decimal import itertools import numpy as np import pytest from pandas.errors import ( InvalidIndexError, Pandas4Warning, ) import pandas as pd import pandas._testing as tm fr...
7c68abb40516ebe2f23fd9a155f6a550410e86ae1437b551cf66e93470d69395
Python
40,426
1,253
""" :mod:`pandas.io.html` is a module containing functionality for dealing with HTML IO. """ from __future__ import annotations from collections import abc import numbers import re from re import Pattern from typing import ( TYPE_CHECKING, Literal, cast, ) from pandas._libs import lib from pandas.compat...
699b785b45c959f3bacc41c50ca25cfbbe088f73672031beafa90761b476961c
Python
40,440
1,059
#!/usr/bin/env python import argparse import gzip import logging import os import re import signal import subprocess import sys import time from collections import defaultdict logging.basicConfig( format='[%(asctime)s %(levelname)s] %(message)s', stream=sys.stdout ) log = logging.getLogger(__na...
e138b931902ee79e115ee04fa5198c0e256d0fc6ae45e324de696efd1c3488d0
Python
40,495
1,026
# 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...
1fff27773669ea69308c6a83aa82d1414e97a93e2b20b44ef952b7d34a80acf1
Python
40,509
1,288
from __future__ import annotations from datetime import ( datetime, timedelta, ) from typing import ( TYPE_CHECKING, Literal, overload, ) import warnings from dateutil.relativedelta import ( FR, MO, SA, SU, TH, TU, WE, ) import numpy as np from pandas._libs.tslibs.offs...
abcc7ce225a82b5b517b5c0fc184af75a352193981bd5c4c9b7634bf5c2985a9
Python
40,512
953
#!/usr/bin/env python """ Step S9 (CheckM branch): Short-read-based reassembly of bins. CheckM-specific reassembly workflow using short-read data on CheckM-filtered binsets. """ from Bio import SeqIO import sys, os, threading, copy, math from multiprocessing import Pool def mod_bin(binset_folder): """ Crea...
f2985010f8ce6892b48d9b85f9765e56a1dd85d6b3bfbbcafff1ec67decead08
Python
40,653
884
"""Tests for the KData class.""" import datetime import io import re import shutil from collections.abc import Sequence from types import EllipsisType from typing import Literal from xml.etree import ElementTree as ET import h5py import ismrmrd import pytest import torch from einops import repeat from ismrmrd.seriali...
808fe2dc58351f0a7c88ebb1f3d4266f0080b78be16ae5e8578d406d514e2447
Python
40,683
1,071
#!/usr/bin/env python3 """ Build an interactive SVG visualization of a chaining problem using D3.js. Usage: build-chain-viz.py <data_directory> <chain_number> <output.svg> """ import sys import os import glob import json import gzip import base64 from collections import defaultdict, Counter def parse_seeds_file(fil...
768a93ecf4461356269c2c7bd7c3dabd51405c98da078650b32b29a41eba35b5
Python
40,726
1,264
""" :mod:`pandas.io.html` is a module containing functionality for dealing with HTML IO. """ from __future__ import annotations from collections import abc import numbers import re from re import Pattern from typing import ( TYPE_CHECKING, Any, Literal, cast, ) from pandas._libs import lib from pand...
2f8e38ba921c90557e4be5418d337ef217c0d52d8ba1ccfc4fd4587fd4598164
Python
40,737
1,099
# Copyright 2018-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...
e0c827b2a25afc317f343b2b4cc97a36e49615cd290bf2d134128646dd08ffad
Python
40,748
872
# 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...
d7d7971b4061f01d78679bcea450642013762221bd0958c4e1af3f99d9718a64
Python
40,761
946
"""High-level Model class for loading trained checkpoints and running inference.""" from __future__ import annotations import copy from pathlib import Path from typing import Any, Literal, cast, get_args import cv2 import numpy as np import pandas as pd import torch from omegaconf import DictConfig, ListConfig, Omeg...
4b804b228deee5bceb30f80dfdf62e6c47bd41fa666a4bc6f01b86b730778f6a
Python
40,782
923
import argparse import json import logging import os import platform import re import sh from sh import git import signal import subprocess import sys import time import traceback from datetime import datetime import coloredlogs import redis import yaml from redis import Redis from .exceptions import (GraphError, Nod...
6e5741b18a227c142080918d2eb1cdec5d49969f682cab621fe5727c645cfd56
Python
40,821
1,119
"""Test of Quick View set functionalities""" import pathlib import shutil import dclab import h5py import numpy as np import pytest from PyQt6 import QtCore, QtWidgets from shapeout2 import session from shapeout2.gui.main import ShapeOut2 datapath = pathlib.Path(__file__).parent / "data" @pytest.fixture(autouse=Tr...
9bddf0228c43a43757d3049edaff08bea1ad677a7c2193d77f68acc6ae83e2fb
Python
40,857
942
""" .. module:: main :platform: Linux, Windows :synopsis: GUI for interactive volume segmentation .. moduleauthor:: Fredrik Nysjo """ import cmd_manager import cmd_volume import gfx_mpr import gfx_manager import gfx_shaders import gfx_utils import image_dicom import image_manager import image_nifti import image...
84867c385d3ea273709c162f103e284602bfce34a2a7f6a98b6dec9b216d12d3
Python
40,924
986
# 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...
2e6e6320b2ca97e6d4cb4cc1fb6fd2f2c0bd16f4f376c7798a873fa5d8659820
Python
40,956
1,070
# 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...
6ffc25adfc71a9034731f009582661fe83228c79b1fef948c1f717b1154f8529
Python
40,972
732
# 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...
93f51b72aadc1c1ce1c7e514fb7fb29f564418dc56b23ab4aa0fc574d229f108
Python
40,989
1,172
# 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...
1889e73c61cbfea06ea787fda7df2427f92bf3bcded21b18fdedd8724306e243
Python
40,998
887
import os import time import numpy as np from datetime import datetime import torch import torch.nn as nn from torch import optim from torch.utils.tensorboard import SummaryWriter from rl_games.algos_torch import model_builder, torch_ext from rl_games.common import vecenv, schedulers, experience from rl_games.common....
f668f52bdea2c4f578af5b0748cb56bd489b534b56f2fa38fae1b8ea2b03bfc7
Python
41,011
1,012
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Pattern exploration and detection Explore and detect patterns (loops, borders, centromeres, etc.) in Hi-C contact maps with pattern matching. Usage: chromosight detect [--kernel-config=FILE] [--pattern=loops] [--pearson=auto] [--win-size=a...
ba5ed9578f7f17733070776ba7061c0424d1cf8b6040c70063318090e0e89d4b
Python
41,019
1,042
import numpy as np import pytest from pandas.errors import Pandas4Warning import pandas as pd import pandas._testing as tm from pandas.core.arrays.sparse import SparseArray class TestReductions: @pytest.mark.parametrize( "data,pos,neg", [ ([True, True, True], True, False), ...
c96a1b7bd7d0442bb1aec777974084dd7ef882423c90e473fdb2dfaa7f724ea4
Python
41,032
1,243
# -*- coding: utf-8 -*- '''icsd testing suite''' import os import numpy as np import numpy.testing as nt import quantities as pq import scipy.integrate as si from scipy.interpolate import interp1d import icsd import unittest #patch quantities with the SI unit Siemens if it does not exist for symbol, prefix, definitio...
328cfb2312e584307ea6bd0505d908c079bcd6f03ccc7cc6f4aea80dca14c872
Python
41,035
749
from __future__ import print_function import argparse import HTSeq import os import pyfaidx import regex from statsmodels.distributions.empirical_distribution import ECDF import sys import numpy as np """ Tabulate merged start positions. Identify genomic coordinates for reads mapping across 151/152 bp position. ...
21fff92cc3f8791000c3d69116d4e927415af9682070da0f4d18a4de8910311d
Python
41,106
1,034
# 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...
2ab892f9ea2c8b2d9a788657058ce5ec56f8aecb6328735a972efcb3a219da72
Python
41,124
1,205
from __future__ import annotations import datetime from functools import partial from typing import ( TYPE_CHECKING, cast, ) import numpy as np from pandas._libs.tslibs import Timedelta import pandas._libs.window.aggregations as window_aggregations from pandas.util._decorators import set_module from pandas....
8ce6c487717c6b5b4a51ac66c9ca7d61feff9380759006fb89d0596fb41992f2
Python
41,165
1,089
import scipy.io import pandas as pd import numpy as np import h5py import sys import os import math import pickle from tensorflow import keras from keras.models import Sequential from keras import layers, optimizers from keras.initializers import GlorotUniform, Orthogonal from xgboost import XGBClassifier from imblearn...
fce816a16cb3f12e6547085db9ce47a01636a1baa668becae4419c97cc142f4b
Python
41,220
1,231
# -*- coding: utf-8 -*- """ Script for evaluation of ODE-based forecasting. Specifically, Fig. S7, S8 are plotted here. Created on Fri Apr 28 16:50:03 2023 @author: jeanbaptiste """ import time import json import pickle import copy from scipy.integrate import solve_ivp from scipy.linalg import inv import numpy as np...
ea31ca8fb43dc465ca6f9bb4e28d34e8598cd547a3a54359656e7df36f03ad1f
Python
41,259
894
""" Original Author Ernesto P. Adorio, Ph.D Original Source: http://my-other-life-as-programmer.blogspot.com/2012/02/python-finding-nearest-matching-color.html Modifed By: JDiscar This class maps an RGB value to the nearest color name it can find. Code is modified to include ImageMagick names and WebColor names. ...
dacd26d6b060ca16a89c6dda66d292936c8cd0d8f6012fa7d557a264aecca29b
Python
41,306
1,111
# 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...
017552a2aac4f2d37595509bac460f7c452e03d648da4745eac6eb98e1ba8e1e
Python
41,345
1,118
# 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...
9217264cd5d5bb7e57184feaa2e408498728f8d89f8ee5676f796c166f5f677e
Python
41,369
1,290
##General imports import csv import os import time from datetime import datetime import shutil import copy import numpy as np from functools import partial import platform ##Torch imports import torch.nn.functional as F import torch from torch_geometric.data import DataLoader, Dataset from torch_geometric.nn import Da...
d12b378067e9c7643683eb005f73c60b85db7c27556293f5a0334adc4b571645
Python
41,395
1,173
# 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...
6f4c953a18e407135289f0a0bae97ee7e0f92c1a40d5db8d022b017da5d6b15b
Python
41,418
1,144
from collections import ( abc, deque, ) from collections.abc import Iterator from datetime import datetime from decimal import Decimal import itertools import numpy as np import pytest from pandas.errors import ( InvalidIndexError, Pandas4Warning, ) import pandas as pd import pandas._testing as tm fr...
f63b9ea5319a7bc26173096784d499734472947ff3df7954ac714aa74ae690e8
Python
41,449
1,189
from datetime import datetime import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm def get_test_data(ngroups=8, n=50): unique_groups = list(range(ngroups)) arr = np.asarray(np.tile(unique_groups, n // ngroups)) if len(arr) < n: ...
2497cd4aaf8ac548843d6851675fbe235458edc12a425fe46704bd68671c841b
Python
41,456
1,121
# 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...
8ce679872c8a152a726dd42538a1b50247200510e0261fec341d38600c66db6b
Python
41,522
1,293
##General imports import csv import os import time from datetime import datetime import shutil import copy import numpy as np from functools import partial import platform ##Torch imports import torch.nn.functional as F import torch from torch_geometric.data import DataLoader, Dataset from torch_geometric.nn import Da...
557838eeeda166ca9ec2acdddf69a6bb296a79eef2d5c33591f7675f1c176429
Python
41,647
1,255
from datetime import ( datetime, timedelta, ) from io import StringIO import re import sys from textwrap import dedent import numpy as np import pytest from pandas._config import using_string_dtype from pandas.errors import Pandas4Warning import pandas as pd import pandas._testing as tm def _three_digit_e...
0b6d2c784caec9389a66dd7bbf172ec5b931f5c96b848eba2b6215d7efe8eb89
Python
41,698
921
# 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...
f093d5554dbfbd307377e96189febb72608852a01a3072ea521f0a251083886c
Python
41,702
1,049
# Copyright 2021 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
ab13e6d355855f1f5374ef1f6abbfb8cda2d772ec647162f538289501a428493
Python
41,706
1,241
import contextlib import datetime as dt import hashlib import re import tempfile import time import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.api.types import ( CategoricalDtype, ) from pandas.util.version import Version from pandas.io.pytables import ( HDFStore, ...
6e73a32c7052db2944c022adacb2eb1044ef2384a2bb23a6e4f53fef4e18ac72
Python
41,741
1,130
# cython: language_level=3 # Time-stamp: <2024-10-15 10:20:32 Tao Liu> """Module Description: Build shifting model 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). """ # ------------------------------------ #...
3a8eef2eb278a6d9a6417c5cfdb3287a3a361866893fd2d910602a9ac7100901
Python
41,790
1,166
import csv from datetime import ( UTC, datetime, ) import io import os import sys from zipfile import ZipFile import numpy as np import pytest from pandas.compat import is_platform_windows import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm from pandas.core.arrays impor...
2b7f46b00a6cd4672e6083cfb13d06c106785f4c01cffb7c52a2e7acee1fa2ef
Python
41,875
956
# 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...
5228d820ad9ef073890dffa3477d5f288c5f560290fadc0635c2e7a418512744
Python
41,927
1,115
# Copyright 2018-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...
fae695c3e3706db294f90716ca2c95ba82694fff07f706a94a92a3560e1eafc5
Python
41,987
1,066
from __future__ import absolute_import import numpy as np import pandas as pd ## Adding conditional import for compatibility between ## sklearn versions ## The second commented line corresponds to a more recent version #from sklearn.preprocessing import Imputer #from sklearn.impute import SimpleImputer try: from ...
a2fc69ffdc83d555f1957d7673558028d20f05378a8df927cc891a6c53653805
Python
42,025
1,112
# 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...
c79530cd86805f5ce953d1c52992a4b1dd8a7be62f095afc782910637cba4346
Python
42,134
1,260
import contextlib import datetime as dt import hashlib import re import tempfile import time import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.api.types import ( CategoricalDtype, ) from pandas.util.version import Version from pandas.io.pytables import ( HDFStore, ...
74762fc80e65263871786a55ce1a70fb42983d5d17dfbbffb5f7ad1cdac01dfb
Python
42,183
1,145
#!/usr/bin/env python """Module Description: Test the option validators in MACS3/Utilities/OptValidator.py. Options are built with the real ``bin/macs3`` argument parser and then passed to the validator, as ``bin/macs3`` does. Where a branch can only be reached with a value that argparse rejects (a format outside the...
998cbc7f3b5ed0c90a537a8736cbec67083ed76be3b6b23799239d76e70cba0a
Python
42,257
1,199
#!/usr/bin/env python """ Translator Class and builder """ import codecs import os import time import re import numpy as np from itertools import count, zip_longest import torch from onmt.constants import DefaultTokens import onmt.model_builder import onmt.inputters as inputters import onmt.decoders.ensemble from onm...
a7967422f0b77768874f14d308687450086d19c6bff9779f2fb06bb483fbf889
Python
42,276
1,088
# 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...
ffc5d79015fe80ef556f21d103d4a55ae0c19bae46d7175929f5762332c23e11
Python
42,314
1,061
# 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...
c2325f187b205f02c82af94be5f1a00f90fc0d8ad5f062821b868978dbc27e51
Python
42,324
1,219
""" :mod:``pandas.io.xml`` is a module for reading XML. """ from __future__ import annotations from functools import partial import io from os import PathLike from typing import ( TYPE_CHECKING, Any, ) from pandas._libs import lib from pandas.compat._optional import import_optional_dependency from pandas.err...
33f82d7aa1dbb7bf8d70cf9007c61a0800960e7bc11d97eecfdbde6d0c9ba35c
Python
42,327
1,244
from __future__ import annotations import contextlib import datetime as pydt from datetime import ( datetime, tzinfo, ) import functools from itertools import chain from typing import ( TYPE_CHECKING, Any, cast, ) import matplotlib as mpl import matplotlib.dates as mdates import matplotlib.units a...
b2d4f6c975cd58126cfa8849fa1c61ef3531e135e8b60c40c380d6f9a2d75503
Python
42,329
952
''' Created on Mar 8, 2012 @author: regger, abast abast: february 2019: deprecated scaleFunc keyword, added support to specify cell_modify_functions within the parameters ''' import warnings from neuron import h import numpy as np import math from . import reader from .cell import PySection, Cell from . import cel...
50e9fc4306f1be1abd1708da171a217c48e50e7f37c1a4cd59d4afcd2097a550
Python
42,342
1,413
# -*- coding: utf-8 -*- """ Created on Mon Sep 13 16:06:38 2021 @author: jeanbaptiste """ import time import warnings from typing import cast, Tuple, List, Optional, Union, Any, Dict import copy import numpy as np import matplotlib.pyplot as plt from .. import config as cfg from .processors import AbstractControlle...
29099dc152dc1f760941e946fa729b325088e226fd7b3037b1d46f905f66495c
Python
42,350
1,583
# Author: Leland McInnes <leland.mcinnes@gmail.com> # # License: BSD 3 clause import numba import numpy as np import scipy.stats from sklearn.metrics import pairwise_distances _mock_identity = np.eye(2, dtype=np.float64) _mock_cost = 1.0 - _mock_identity _mock_ones = np.ones(2, dtype=np.float64) @numba.njit() def si...
6efbb77fff65b26e15f2dae0819e0550a5d6248d3a4c72cc89cfdfb8b0420f7a
Python
42,458
904
#! /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...
a82cd0237c037e0d88104beada748a8c9351d3c5a90293403fd39c7015a65b84
Python
42,475
1,138
# coding: utf-8 """This module implements all the read modifications that atropos supports. A modifier must be callable. It is implemented as a function if no parameters need to be stored, and as a class with a __call__ method if there are parameters (or statistics). """ from collections import OrderedDict import copy ...
a0c2a013d51fab10c39ae0305b4cadd07de649bac50fd7084bd42c5b6d80c397
Python
42,508
998
# 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...
4988b1383724e849ee320b1fe719165554128a82b99143ddb77d69b3dfa94227
Python
42,510
1,175
"""File that contains PES object data generated via functions in vibrant.""" # pylint: skip-file import numpy as np # Reference copied from vibrant HDF5 files # mol = H2S # coords =[[0.0, -1.0, -1.0], [0.0, 1.0, -1.0], [0.0, 0.0, 0.0]] # localize = True taylor_1D = np.array( [ [1.01030577e-05, -4.474054...
9688024d8243b3539ac921f48a08c80e4b532070af294f1adbaf04e539578c9f
Python
42,524
1,225
""" :mod:``pandas.io.xml`` is a module for reading XML. """ from __future__ import annotations from functools import partial import io from os import PathLike from typing import ( TYPE_CHECKING, Any, ) from pandas._libs import lib from pandas.compat._optional import import_optional_dependency from pandas.err...
f204ed799abbcc04776e690699531df66102925c76e74f7e138020801c1ab47f
Python
42,578
1,130
# # pandas documentation build configuration file, created by # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # se...
7a02feb48b39c22071f47a93e8d361ec085bd59b8cc551b8751ef1d7d3a0f55f
Python
42,618
932
# -*- coding: utf-8 -*- # Authors: Gianvittorio Luria <luria@dima.unige.it> # Sara Sommariva <sommariva@dima.unige.it> # Alberto Sorrentino <sorrentino@dima.unige.it> # # License: BSD (3-clause) import os os.environ['SCIPY_ARRAY_API'] = '1' import itertools import time import copy import numpy as np...
6422cfc7892cb5d076194354b05fe91fe40a49cee28548e62c4e211f32cfa050
Python
42,716
1,253
""" Class to store parameters of undirected graphical model of sequences and perform calculations using the model (statistical energies, coupling scores). Authors: Thomas A. Hopf """ from collections.abc import Iterable from copy import deepcopy from numba import jit import numpy as np import pandas as pd # Consta...
89c8ccc1f2bfff4afbafc3748b0aaaccf868dd4eab343659c9fd6733c7ad4e55
Python
42,718
1,033
#SphericalCoordCalculation.py # interface module for accessing pdb files # import imp import os import Bio.PDB as pdb import Bio.PDB.mmtf import numpy as np import protein_holography.coordinates.COA_ref_frame as COA from protein_holography.coordinates.geo import cartesian_to_spherical import protein_holography.holog...
165a91b521386457a62c760cf2b585f9c5ecfbe197b29ab64546383f173921b6
Python
42,784
1,247
""" Tests date parsing functionality for all of the parsers defined in parsers.py """ from datetime import ( datetime, timedelta, timezone, ) from io import ( BytesIO, StringIO, ) import numpy as np import pytest from pandas._config import using_string_dtype from pandas._libs import lib from pan...
ff1136ef48cb97397ebe7a8d6b7052ed51e162ce801fdccd792d239076bbb06f
Python
42,821
930
"""Topic modeling with generalized correspondence latent Dirichlet allocation.""" import logging import os.path as op import nibabel as nib import numpy as np import pandas as pd from nilearn._utils import load_niimg from scipy.stats import multivariate_normal from nimare import references from nimare.base import NiM...
e4a919b99531152c01e9847a1b48462203c978b30a794928932742234123e4c1
Python
42,824
1,054
#!/usr/bin/env python """Module Description: Test MACS3.Commands.callvar_cmd and the ``macs3 callvar`` command: check_names, run, call_variants_at_range, every command-line option and the option validation. Inputs are small sorted and indexed BAM files written with pysam whose reads carry MD tags computed against a d...
841ad35e57d1701b01e67a6e68ad8a6c0211af3fd9a7f9d8708a93f39ef20d19
Python
42,829
1,139
# 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...
175ef1a32c477a919bb7095fe9605865fe61981f8526ad564703975eccd5e6ef
Python
42,858
996
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import altair as alt import numpy as np import pandas as pd import os.path as op import os from math import ceil, floor from pymatch.Matcher import Matcher from tqdm import tqdm import scipy.stats as st from scipy.optimize import linear_su...
ed79311f689ab2f4e0719d8f0da1f4d2da910038f91157c267694359d45ba1e5
Python
42,871
1,245
from datetime import datetime import numpy as np import pytest import pandas.util._test_decorators as td from pandas.core.dtypes.common import is_scalar import pandas as pd import pandas._testing as tm @pytest.fixture(params=["default", "float_string", "mixed_float", "mixed_int"]) def where_frame(request, float_s...
4b8c5892b29b0614870cca86937b7ee09714b9671df7052e4ce638abda5fc618
Python
42,907
1,159
from __future__ import annotations import itertools from typing import ( TYPE_CHECKING, cast, overload, ) import warnings import numpy as np from pandas._config.config import _global_config as config from pandas._libs import lib import pandas._libs.reshape as libreshape from pandas.errors import ( P...
bd90a611eeea24c56f8daa5d6c40150cffc43954ed6dee610ff6f19dbf8c6fc2
Python
42,915
1,235
""" This file contains code for some utility functions, such as code for saving CSV logs. vivian added codes for loading datasets Code credits to Xifeng Guo: `https://github.com/XifengGuo/CapsNet-Keras` """ import numpy as np from matplotlib import pyplot as plt import csv import math import numpy as np from tensorf...
062b4de6b7f9eb7897ec41ad7518e3c95b86dab590dd3413f62100d8a92ac264
Python
42,933
1,230
from collections import deque from datetime import ( UTC, date, timedelta, ) from decimal import Decimal from enum import ( Enum, auto, ) import operator import numpy as np import pytest from pandas._libs import lib from pandas.errors import Pandas4Warning import pandas as pd import pandas._testi...
781351164af790bc29c916b634f4d184806650370391761a1bc3774b5ab7bd66
Python
42,943
1,158
from __future__ import annotations import itertools from typing import ( TYPE_CHECKING, cast, overload, ) import warnings import numpy as np from pandas._config.config import _global_config as config from pandas._libs import lib import pandas._libs.reshape as libreshape from pandas.errors import ( P...
41595fba101a9adfd716755de36302981c17ab7bce9ea6d1f4ce5cf6eb6e5437
Python
42,969
969
#!/usr/bin/env python """Module Description: Test functions of the pileup subcommand (MACS3/Commands/pileup_cmd.py), called directly and through ``macs3 pileup``. 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...
62cc753f57c8fd38d37e722c54dac2e5fa2364a8ca591f1320856e59769e75de
Python
42,993
1,224
# 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...