sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
53508da5ccaa87762e1ab5d27021b2adf79a57f3a5b5b8fd6c4eaebbe1cf961c | Python | 56,092 | 1,604 | #MIT License
#
#Copyright (c) 2019 Iñigo Prada Luengo
#
#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, copy, modify, merge,... |
90af231e787a9995fecccdcd10fe5fd7f78b0d7a3a47986b0183adf156a772c3 | Python | 56,141 | 1,531 | from datetime import (
UTC,
date,
datetime,
timedelta,
)
import locale
import re
import numpy as np
import pytest
from pandas._libs.tslibs import (
iNaT,
)
from pandas._libs.tslibs.ccalendar import (
DAYS,
MONTHS,
)
from pandas._libs.tslibs.parsing import DateParseError
from pandas._libs.t... |
0cbb17ea71ac13c0e5088112716e7debc5bf20934c940b567159a57aedc637ed | Python | 56,218 | 1,355 | # 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... |
c91fee72d76f887c01d9182ad6271068defb42257d46dcb8fbd6702ee72a88aa | Python | 56,272 | 1,305 | import ntpath
from numba import jit, prange, int64
from sys import path as sys_path
sys_path.append('../master-KMS/py-lddmm/')
sys_path.append('../master-KMS/py-lddmm/base')
import os
from base import loggingUtils
import multiprocessing as mp
from multiprocessing import Pool
from glob import glob
import pandas as pd
im... |
c176a797486b05f15b08478fb3c6053b0ea2f16e2827652ff50996c1a8074eab | Python | 56,337 | 1,263 | """Dataset objects store images, labels, and functions for manipulation.
Three classes, in a hierarchy:
- :class:`BaseTrackingDataset` -- base class. Loads images and (x, y) keypoints, applies the
imgaug pipeline, and handles ``imgaug_hflip``. Returns a ``BaseLabeledExampleDict``.
- :class:`HeatmapDataset` (extends... |
151e40c8b092139e96a682329d2e644b3f934562bd4965be227455fad0ecfabb | Python | 56,404 | 1,490 | # 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... |
d3334961e4f7c19744a0b3423bc989bdae23e559252ba3330632542844528970 | Python | 56,473 | 1,703 | """test with the .transform"""
import numpy as np
import pytest
from pandas._libs import lib
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.common import ensure_platform_int
import pandas as pd
import pandas._testing as tm
from pandas.core.groupby import NamedAgg
from pandas.tests.groupby import g... |
585b7b210ccaa34772efe59cd8928488e3dea74f644dbe7bc6612ca839e121f3 | Python | 56,477 | 1,577 | from __future__ import annotations
from collections import abc
from datetime import date
from functools import partial
from itertools import islice
from typing import (
TYPE_CHECKING,
TypeAlias,
TypedDict,
Union,
cast,
overload,
)
import warnings
import numpy as np
from pandas._libs import (
... |
e2b30cb7f7965426f717df56af89d2f7d57f0124595fbcfce63a4c06777f9458 | Python | 56,491 | 1,584 | from datetime import (
date,
datetime,
)
import itertools
import re
import numpy as np
import pytest
from pandas._libs.internals import BlockPlacement
from pandas.compat import IS64
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.common import is_scalar
import pandas as pd
import pandas._te... |
0d4de868292770813c85701c87086f559e1b629a63c448f52ff9fc011532d98c | Python | 56,567 | 1,338 | # 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... |
f4d37902f13aa19b89154000d50805b863ce4f749e3c9f46db4840e3091bf276 | Python | 56,852 | 1,555 | from datetime import (
UTC,
datetime,
)
import numpy as np
import pytest
from pandas.core.dtypes.base import _registry as ea_registry
from pandas.core.dtypes.common import is_object_dtype
from pandas.core.dtypes.dtypes import (
CategoricalDtype,
DatetimeTZDtype,
IntervalDtype,
PeriodDtype,
)
... |
a2e6a7e38d2ab111b81b42b9fc96ffeb87d1fcfb934b04d45ff916cbaca24a70 | Python | 56,951 | 1,441 | #! /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... |
8a78a95f49b3786123c08df14ef6e2d9c3dd10f3d0675d86f18d7f0e691b65b1 | Python | 56,990 | 1,382 | # 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... |
2be0d15d18d6175fbe75a98d492acddfabcbe6694390ada37ab61e3ad74184ae | Python | 57,024 | 1,454 | #!/usr/bin/python3
"""
giraffe-facts.py: process a GAM file from the new minimizer-based mapper (vg giraffe) and report runtime statistics by filter.
"""
import argparse
import concurrent.futures
import functools
import os
import sys
import time
import subprocess
import collections
import io
import itertools
import... |
e1300e9f69752262173df4148a615304ad09163eea571888fab36748cc0237f2 | Python | 57,036 | 1,591 | from __future__ import annotations
from collections import abc
from datetime import date
from functools import partial
from itertools import islice
from typing import (
TYPE_CHECKING,
Any,
TypeAlias,
TypedDict,
Union,
cast,
overload,
)
import warnings
import numpy as np
from pandas._libs ... |
5aeff4d9134de352f73d9eae9463810f4c92b458b978e6c4522e8e7cdd642453 | Python | 57,426 | 1,594 | # Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for numeric dtypes
from __future__ import annotations
from collections import abc
from datetime import timedelta
from decimal import Decimal
import operator
import numpy as np
import pytest
import pandas as p... |
4e7351be525321d44324040a030e3db549cd4bc69f4a582c13a66ba5e08a1f4d | Python | 57,569 | 1,592 | # 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... |
52592c687d7c2da704712fad7a6d59e3e353dbc958e8c634426e250489ab4838 | Python | 57,608 | 1,481 | import datetime
import decimal
import re
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.dtypes import ExtensionDtype
import pandas as pd
import pandas._testing as tm
from pandas.core.arrays import ExtensionArray
class DummyDtype(ExtensionDtype):
type = int
... |
b43b900b405472a5568dbabad4ca5ab1c5e941e6c397cfe5eb3d1a97e4e4990d | Python | 57,676 | 1,547 | # 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... |
b28b699e8fc96295c3cd25fe2b086242c200c4e871c1fe6c7606735d17d311a1 | Python | 57,803 | 1,681 | """
Distance calculations on PDB 3D coordinates
Authors:
Thomas A. Hopf
Anna G. Green (remap_complex_chains)
"""
from collections import Counter
from itertools import combinations
from operator import itemgetter
from copy import deepcopy
import numpy as np
import pandas as pd
from numba import jit
from evcoupli... |
cba52a0ad521575d4068c2e3d0fc2eb258907f090e1648f7ad8ddaab68241fda | Python | 57,825 | 1,709 | from __future__ import annotations
from datetime import timedelta
import operator
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
TypeVar,
cast,
)
import warnings
import numpy as np
from pandas._libs import (
algos as libalgos,
lib,
)
from pandas._libs.arrays import NDArrayBac... |
85e1808e2cc0004a42dc320bfecf9be2ad601926b1794bc56fd8e0bbf3c887cc | Python | 57,916 | 1,419 | # 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... |
bb0de3059264ff1b51d521efade438a080c87997ab1a684a4d1eaa3c30e50de9 | Python | 57,977 | 2,001 | """
Common type operations.
"""
from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
)
import warnings
import numpy as np
from pandas._config import using_string_dtype
from pandas._libs import (
Interval,
Period,
algos,
lib,
)
from pandas._libs.tslibs import conversio... |
da2d9eac7de768ffb5f4c3002537aa10c92ea863cc35827f7e3c80adb1ded4c8 | Python | 57,997 | 1,505 | #!/usr/bin/env python
from random import random
import sys
from treeshrink._vendor.dendropy.datamodel.taxonmodel import Taxon
from copy import deepcopy
from functools import reduce
import itertools
import io
try:
filetypes = (io.IOBase, file)
except NameError:
filetypes = io.IOBase
try:
from StringIO impo... |
84360dc70f993a0bc9294895538d0741e5dfa555eb3e6a5791ac6f7f6fd44c69 | Python | 58,107 | 2,004 | """
Common type operations.
"""
from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
)
import warnings
import numpy as np
from pandas._config import using_string_dtype
from pandas._libs import (
Interval,
Period,
algos,
lib,
)
from pandas._libs.tslibs import conversio... |
ee75a86a2f0146d6082150b0a6e705d0ee84dfaa836398b51e11ed2f71ed6fc3 | Python | 58,196 | 1,327 | #!/usr/bin/env python3
"""SuperBigFLICA utilities with corrected held-out dictionary projection."""
from __future__ import annotations
import copy
import json
import os
import random
import time
from copy import deepcopy
from pathlib import Path
import nibabel as nib
import numpy as np
import pandas as pd
import scip... |
cabf90aaba3aaf872df08f69e7fb2af2735d4a4c06bc4af09b62a4c979570abc | Python | 58,226 | 1,482 | """
Module providing the NormativeModel class, which is the main class for building and using normative models.
"""
from __future__ import annotations
import copy
import glob
import json
import os
import uuid
from typing import List, Optional, Tuple, Union
import numpy as np
import scipy.stats as stats
import xarray... |
5484945351a002707d5bef1d0d46c92817e266960cb583935d99185f29f4e9df | Python | 58,236 | 1,624 | """test parquet compat"""
import datetime
from decimal import Decimal
from io import BytesIO
import os
import pathlib
import uuid
import numpy as np
import pytest
from pandas._config import using_string_dtype
from pandas.compat import WASM
from pandas.compat.pyarrow import (
pa_version_under17p0,
pa_version... |
43df405099ba7955d1e12e5cc1a44c868be2e1abe6340c04f785f5cf6d035dc6 | Python | 58,403 | 1,648 | """
EC to 3D structure comparison protocols/workflows.
Authors:
Thomas A. Hopf
Anna G. Green (complex and _make_complex_contact_maps)
"""
from copy import deepcopy
from math import ceil
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from io import StringIO
from evcouplings.align.alignment... |
12dfb6ca8c71538a5e1682672437863649aa5573a41247736eef22541d8933aa | Python | 58,517 | 1,620 | from __future__ import annotations
from collections import abc
import csv
from io import StringIO
import re
from typing import (
IO,
TYPE_CHECKING,
Any,
Literal,
cast,
final,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas.errors import (
EmptyDataError,
... |
05651773b5d69a4a5604f579fa9b27a3f9882616f7e5cba246220f7edae088b0 | Python | 58,730 | 1,632 | from __future__ import annotations
from collections import abc
import csv
from io import StringIO
import re
from typing import (
IO,
TYPE_CHECKING,
Any,
Literal,
cast,
final,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas.errors import (
EmptyDataError,
... |
46365778e9657ae39cd285426063e9347fcc9649f79eee1c3fff84005de0ea12 | Python | 58,764 | 1,701 | from functools import cmp_to_key
def docstring_from_kwarg(kwarg):
"""
Generate docstring from CDR keyword argument object.
:param kwarg: Keyword argument object.
:return: ``str``; docstring.
"""
out = ''
if not kwarg.suppress:
out += '- **%s**: %s; %s' % (kwarg.key, kwarg.dtypes_... |
da95afafe87da597bd81ac91fcc8499cb7c5cbcc4e8f1d917935d5e164d8aecf | Python | 58,866 | 1,455 | """
Tests for offsets.BusinessHour
"""
from __future__ import annotations
from datetime import (
datetime,
time as dt_time,
)
import pytest
from pandas._libs.tslibs import (
Timedelta,
Timestamp,
)
from pandas._libs.tslibs.offsets import (
BDay,
BusinessHour,
Nano,
)
import pandas as pd... |
91b38db60fb2c905a8072ee758a6d9b219c6f1c7a3bea492ac13fe9413a40924 | Python | 58,886 | 1,625 | # Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for numeric dtypes
from __future__ import annotations
from collections import abc
from datetime import timedelta
from decimal import Decimal
import operator
import numpy as np
import pytest
from pandas.errors... |
1f605bc385791f64c5e36b2f9ecc416f15791ecaedc2c9e00e29d2f82d11c23b | Python | 58,900 | 1,172 | #MIT License
#
#Copyright (c) 2019 Iñigo Prada Luengo
#
#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, copy, modify, merge,... |
ab5f74aa978465dffc471523856a0f1e1fd9ce2f1c96a90865fad322c7f08a37 | Python | 58,930 | 1,724 | import torch
import numpy as np
from matplotlib import pyplot as plt
import pandas as pd
import time
from sklearn.model_selection import KFold
import matplotlib as mpl
from torch import nn
from tqdm import tqdm
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
try:
import shap
except Impo... |
5b76ed5f7a2cce8c2452b2002f8c8874125b43b7357d4c2686fcbbeba9f90b9a | Python | 59,123 | 1,616 | # Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for Period dtype
import operator
import numpy as np
import pytest
from pandas._libs.tslibs import (
IncompatibleFrequency,
Period,
Timestamp,
to_offset,
)
import pandas as pd
import pandas._te... |
81fd428f93d1ada746a205fcc5ff7b72e9771633186466257762600939b9b432 | Python | 59,145 | 1,707 | from __future__ import annotations
from collections.abc import (
Callable,
Hashable,
Iterator,
Sequence,
)
from datetime import timedelta
import operator
from sys import getsizeof
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
cast,
overload,
)
import warnings
import n... |
5d7828c63152622c32e42f9546288de7a8e918b4c6972c4af4ac8b0ac69d5a6c | Python | 59,180 | 1,777 | """test with the .transform"""
import numpy as np
import pytest
from pandas._libs import lib
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.common import ensure_platform_int
import pandas as pd
import pandas._testing as tm
from pandas.core.groupby import NamedAgg
from pandas.tests.groupby import g... |
ecf45027226ebff5176da3d032ab494d971cfd0b431b6f1b7a0e471f5327a72f | Python | 59,204 | 1,537 | # 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... |
dc2583286394938f39fdc2cd2e7501444ab8384be88ae716a9cb3b3e0093b727 | Python | 59,282 | 1,608 | import contextlib
import copy
import re
from textwrap import dedent
import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
jinja2 = pytest.importorskip("jinja2")
from pandas.io.formats.style import ( # isort:skip
Styler,
)
from pandas.io.formats.style_render import (
_get_level_le... |
b5edfd74e94c438511a62201be1675313790694d9bfaba192c93f1e54aee14a8 | Python | 59,341 | 1,573 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This file contains functions and objects to simulate the behavior of our
optogenetic systems.
Note: This code was used for preliminary evaluations but has not been
used in a while. We will update it soon as part of a theoretical study.
@author: jeanbaptiste
"""
impo... |
86ba8e5eec2d859f2e1edc742a2609261f8556a1987a1127d2df876b549961b7 | Python | 59,474 | 1,593 | import operator
import numpy as np
import pytest
from pandas._libs.tslibs import Timestamp
import pandas as pd
import pandas._testing as tm
from pandas.io.pytables import Term
pytestmark = [pytest.mark.single_cpu]
def test_select_columns_in_where(temp_hdfstore):
# GH 6169
# recreate multi-indexes when co... |
e0d468628b45f9086bf8bbeecd250ddd6260336ab2138f43dac0fe4e2273abf9 | Python | 59,483 | 1,646 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 7 18:48:08 2023
@author: hklumpe
"""
import glob
import sys
import json
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
username='hklumpe'
dcc_repo_path = f"/projectnb/dunlop/{username}/deepcellcontrol/"
fig_path = dcc_re... |
36b11d2831f55a4d860d5a8c2c93399e9899a60052561c858ceb7a13393b222e | Python | 59,573 | 1,577 | # 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... |
0a76bb59f5f2fb58b432386da4082311b6d5510926085b5acd0e895d6f0a9e3c | Python | 59,678 | 1,721 | import numpy as np
import numba
from warnings import warn
try:
import pandas as pd
import datashader as ds
import datashader.transfer_functions as tf
import datashader.bundling as bd
import matplotlib.pyplot as plt
import colorcet
import matplotlib.colors
import matplotlib.cm
impor... |
0130fccfc18799f719dd1decaa4a0e9d551056eeaaf51f522940f9c6da895f2e | Python | 59,782 | 1,427 | #!/usr/bin/env python
# Time-stamp: <2025-04-11 13:46:05 Tao Liu>
import gzip
import logging
import re
import unittest
import numpy as np
import pytest
from MACS3.IO.Parser import (guess_parser,
StrandFormatError,
GenericParser,
B... |
9f7a6d35c9724ff35ff6913f9ae4e5265cc7ed0024fe8f055e7dc64911596616 | Python | 59,936 | 1,633 | # 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... |
57f9d6369c2b5689f575086fbfdfcdae4ede6d09c094a539af9102e29ff4469d | Python | 59,937 | 1,764 | """Run lifecycle routes.
Two prefixes mounted from the same router:
- ``/api/v1/experiments/{experiment_id}/runs`` — submit + list runs for an experiment.
- ``/api/v1/runs/{run_id}`` — fetch, cancel, events, WebSocket.
A ``POST`` to the experiments-nested path enqueues a `RunOrchestrator` job and
... |
9addc6b5a2248873d17101ccab35ce9a3d4961b397d44d4f8099c0063f444c8e | Python | 59,993 | 1,579 | # 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... |
23b5a86c9a1e424baa4bc8c589c7d1b12efb9eed552c873cc7446254c696af77 | Python | 60,128 | 1,688 | """
This submodule contains the interpreter for OpenQASM 3.0.
"""
import copy
import functools
from collections.abc import Callable, Iterable
from dataclasses import dataclass
from functools import partial, reduce
from typing import Any
import numpy as np
from numpy import uint
from openqasm3 import ast
from openqasm... |
f2348ed5beef9c59c229da2a8d286126903d1ce85bc09332b1065023442d7dfc | Python | 60,236 | 1,250 | # 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... |
1495621464b9844886304d1d2c78c1494c205366e70eb852f2ab60fab0bafa25 | Python | 60,313 | 1,740 | from collections.abc import Iterator
import errno
from functools import partial
from io import (
BytesIO,
StringIO,
)
import os
from pathlib import Path
import re
import threading
from urllib.error import URLError
import numpy as np
import pytest
from pandas.compat import (
WASM,
is_platform_windows,
... |
bcd42c434c08cfa577d671d07445cf157b2ff4ad6862a067212b4371d2dcfc56 | Python | 60,404 | 1,356 | # 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... |
a58f26ab9a95aac6dac9dc4c08e437030b9041e7a67f9d0561e811294f5fb52b | Python | 60,408 | 1,501 | """
Created on Sept 2019
@author: Alice Geminiani - alice.geminiani@unipv.it
ANALYSIS of classical eyeblink conditioning simulations
Publication: Geminiani et al., biorXiv, 2022 - doi: https://doi.org/10.1101/2023.06.20.545667
"""
from cmath import nan
from doctest import OutputChecker
from _plotly_util... |
fd798e5a26f1ac2ce1ee5a0a433fb6ccc6534158d3bafbab871e50b896126b8d | Python | 60,479 | 1,657 | # 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... |
33b37771f1c5bda15fd83a18dd45e396458d997ab80ecad66dba61fe221b1744 | Python | 60,595 | 1,825 | # 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... |
db01ce4b96575762e37055bbe4a7bd7b6e0d15dad86a78f1d8a00b15582562d4 | Python | 60,596 | 1,684 | """
Base and utility classes for tseries type pandas objects.
"""
from __future__ import annotations
from abc import (
ABC,
)
from itertools import pairwise
import operator
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
cast,
final,
)
import warnings
import numpy as np
from pand... |
6fbe6c4332ff5fb715d413b934c46842bbbc86fd98db0668eaec149ef4522def | Python | 60,760 | 1,939 | """Contains functions and classes for handling entries within objects.
CLASSES
-------
FillerObject
- Empty object that can be filled with attributes that would otherwise not be
accessible as a class attribute.
METHODS
-------
check_lengths_dict_identical
- Checks whether the lengths of entries within a dicti... |
a80e9068af3da8c02dfd23b00835df533e30e70a47ce7ac363a5aa128978f0af | Python | 60,889 | 1,474 | import bz2
import contextlib
from datetime import datetime
import io
import os
from pathlib import Path
import struct
import weakref
import numpy as np
import pytest
from pandas._config import using_string_dtype
from pandas.compat import HAS_PYARROW
from pandas.errors import (
EmptyDataError,
OutOfBoundsDate... |
c0d406b9307165f8f9df7bf827ed7cb81e700552c188506ffefcf37bca8fb657 | Python | 61,046 | 1,218 | import re
from defs import *
from values import *
import time
#%%
# pick out compartment IDs. E.g. given label=Area_Lumen_Cell, it would return
# (0,1) for (lumen, cell)
def get_interface_id(label):
tmp = (label).split('_')
if len(tmp)==3: # only have two compartment IDs
ind1,ind2 = compart_id[tmp[1]],... |
2a98cbfe85f014a6846516d8f94a8908faa5fa0176ca4afb8b61338581550c60 | Python | 61,071 | 1,595 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 23 15:29:09 2020
@author: reisertm
"""
import tensorflow as tf
import nibabel as nib
import numpy as np
from nibabel.processing import (resample_from_to, resample_to_output, smooth_image)
import json
import os
########## Cropmodel ################... |
a5b120b54690e94713f227bbc47e13ec4b93786acd61791a88d5852ee6fb6bf5 | Python | 61,072 | 1,749 | from __future__ import annotations
import operator
from typing import (
TYPE_CHECKING,
Any,
Literal,
NoReturn,
cast,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._libs.missing import is_matching_na
from pandas._libs.sparse import SparseIndex
import pandas._libs.te... |
6a22c8025fb391e54a2511114f9646184be52619a4b14cc9d969433beb392114 | Python | 61,410 | 1,563 | #! /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... |
a3f24b57d708f3d2cb6d9b9b3d333ce7e92e758b35fb64980ef8a52f4a3faa64 | Python | 61,476 | 884 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'GUI.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Mai... |
295121de1b651109d9452983367092d458ad74e4fe04e232932530bdc2e4a338 | Python | 61,502 | 1,758 | from __future__ import annotations
import operator
from typing import (
TYPE_CHECKING,
Any,
Literal,
NoReturn,
cast,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._libs.missing import is_matching_na
from pandas._libs.sparse import SparseIndex
import pandas._libs.te... |
cc99199a175720745928779ca51e6c5c649d71672bd1db929f48750030a4af86 | Python | 61,984 | 1,791 | from collections.abc import Iterator
import errno
from functools import partial
from io import (
BytesIO,
StringIO,
)
import os
from pathlib import Path
import re
import sys
import threading
from urllib.error import URLError
import numpy as np
import pytest
from pandas.compat import (
WASM,
is_platfor... |
3e9752c0d28a867ea2c5f4467d89ce7b0ffee04a0c542d6489c3900cb09197d6 | Python | 62,006 | 2,117 | from __future__ import annotations
from io import (
BytesIO,
StringIO,
)
from lzma import LZMAError
import os
from tarfile import ReadError
from urllib.error import HTTPError
from xml.etree.ElementTree import ParseError
from zipfile import BadZipFile
import numpy as np
import pytest
from pandas.compat import... |
3b11a91ddb8aff72513346bb191f51337aca9a16d40cac7aabbecb01450e5965 | Python | 62,081 | 1,956 | # Module: containers.models.regression
# Author: Moez Ali <moez.ali@queensu.ca> and Antoni Baum (Yard1) <antoni.baum@protonmail.com>
# License: MIT
# The purpose of this module is to serve as a central repository of regression models. The `regression` module will
# call `get_all_model_containers()`, which will return ... |
3058161bf785eeb3f3fd5cd9e441f57df4dd25dcb74e2fee2a7138b6dc9c025d | Python | 62,095 | 1,877 | import builtins
import datetime as dt
from decimal import Decimal
from string import ascii_lowercase
import numpy as np
import pytest
from pandas._libs.tslibs import iNaT
import pandas.util._test_decorators as td
from pandas.core.dtypes.common import pandas_dtype
from pandas.core.dtypes.missing import na_value_for_d... |
d2c6c6d5cab003b0230e387ff4e7d1317ec9a3ad3c8a8ada4660c74c81415fa5 | Python | 62,127 | 1,523 | import numpy as np
from . import gaussianDiffeons as gd
import numpy.linalg as LA
from . import affineBasis
##### First-order evolution
# Solves dx/dt = K(x,x) a(t) + A(t) x + b(t) with x(0) = x0
# affine: affine component [A, b] or None
# if withJacobian =True: return Jacobian determinant
# if withNormal = nu0, ret... |
267477481432837dee90d7682a0826c3b749c13779002c49511d0caff943ae6c | Python | 62,191 | 1,431 | # -*- coding: utf-8 -*-
'''
SUPER_RES_DATA_WRANGLER_GUI
PYSIMPLEGUI BASED GUI FOR THE CONVERSION OF TRAJECTORY FILES
CONVERT BETWEEN MUTLIPLE FILE FORMATS FROM THE PALMTRACER (METAMORPH PLUGIN)/TRACKMATE (IMAGEJ PLUGIN)--> SHARP VISU --> NASTIC/segNASTIC/BOOSH --> NASTIC WRANGLER SUPER RESOLUTION DATA PROCESSING PIPELI... |
b60dd30748026b936efa9347884bb1da1f53563524199f7e7570fc0f69198c9a | Python | 62,279 | 1,716 | """test parquet compat"""
import base64
import datetime
from decimal import Decimal
from io import BytesIO
import os
import pathlib
import uuid
import numpy as np
import pytest
from pandas._config import using_string_dtype
from pandas.compat import WASM
from pandas.compat.pyarrow import (
pa_version_under17p0,
... |
2b844b0c6140eabba062366f5ef1d4e7d95c03fdb2aa15d363e58a677d33980a | Python | 62,321 | 1,419 | # 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... |
501bee4ece680d16077bbf0820cd19ba1cd85b1a69c978f532974358a12efd44 | Python | 62,385 | 1,576 | # 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... |
40946d04fb45b114ba7b60d8c9860f3e65a663b87ed2741a42380d40ba8f70f7 | Python | 62,404 | 1,715 | # 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... |
54b7185576200dbd795841b9526ff8199bb59ddbf54edb771acb1cc7701a1c2e | Python | 62,418 | 1,795 | # 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... |
2634bda85228877d2e8d8fb8de060b9492eb78e27f1408aa2e478faa696dfc05 | Python | 62,529 | 1,496 | from __future__ import print_function
from windseer.data.interpolation import DataInterpolation, get_smooth_data
import windseer.data.generate_turbulence as generate_turbulence
import windseer.utils as windseer_utils
from enum import Enum
import numpy as np
import random
import threading
import torch
from torch.utils... |
5695b5e56f027d7576a8041c93de45bf3603ff9d247ef9aef5fdd4556b67bf5a | Python | 62,850 | 1,156 | # 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... |
1f43e8f6aa6055988fb1db6e4f4899bc309fcecd9baa8a873ff3de1f51249f0c | Python | 62,891 | 1,745 | """
Base and utility classes for tseries type pandas objects.
"""
from __future__ import annotations
from abc import (
ABC,
)
from itertools import pairwise
import operator
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
cast,
final,
)
import warnings
import numpy as np
from pand... |
e150a93764e0b2c40d51334b8b9d4299450bd21beffabeb738a4a30aaa978e06 | Python | 62,893 | 1,722 | from datetime import (
UTC,
datetime,
)
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.base import _registry as ea_registry
from pandas.core.dtypes.common import is_object_dtype
from pandas.core.dtypes.dtypes import (
CategoricalDtype,
DatetimeTZDtyp... |
42bc69dad1a7733be19e1b83ec497c547ab74d0438557057dbe9f312ed9062ca | Python | 62,977 | 1,804 | from __future__ import annotations
from collections.abc import (
Callable,
Hashable,
Iterator,
Sequence,
)
from datetime import timedelta
import operator
from sys import getsizeof
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
cast,
overload,
)
import warnings
import n... |
e790024db0470e08a8662dca49c6f7bd8776689fe5aee9b59fa6154e2e836771 | Python | 63,328 | 1,935 | from typing import Iterable, List, Literal, Optional, Sequence, Tuple, Union
import numpy as np
import pandas as pd
from anndata import AnnData
from matplotlib import cm
from matplotlib import pyplot as plt
from matplotlib import rcParams
from matplotlib.axes import Axes
from mudata import MuData
_draw_area_color = O... |
c0128db34b23c620cab6c9220602b2d9ee4c361b5ef8a46bfcefe03addc1a7d7 | Python | 63,460 | 1,622 | from collections import namedtuple
from datetime import timedelta
import re
import numpy as np
import pytest
from pandas._libs import index as libindex
from pandas.compat import PY312
from pandas.errors import (
InvalidIndexError,
UnsortedIndexError,
)
import pandas as pd
import pandas._testing as tm
class... |
42156e34a3b2a04a23c5608f20ad3d3c84f547bd249ebbc7654ceacff6082537 | Python | 63,483 | 1,617 | import calendar
import copy
from datetime import (
UTC,
date,
datetime,
timedelta,
timezone,
)
import re
import zoneinfo
import dateutil.tz
from dateutil.tz import (
gettz,
tzoffset,
tzutc,
)
import numpy as np
import pytest
from pandas._libs.tslibs.dtypes import NpyDatetimeUnit
from p... |
664e3e917075e3ccffe29f8c1e0dc96b525d8c2a8bc4d49b67db7fc1a1dccb61 | Python | 63,630 | 1,639 | # 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... |
b4401c8dd19abd5a92be16b982a564371a207ceeae3ef76fb6fff3e7bce548bb | Python | 63,809 | 1,495 | # -------------------------------------------------------------------------------------------------------------------------------------
# Following code curated for GCPNet (https://github.com/BioinfoMachineLearning/GCPNet):
# ----------------------------------------------------------------------------------------------... |
a2be61f930b567686b994a21e271b0cb6b286210708a60a0c26a4822ce983961 | Python | 63,815 | 1,624 | import calendar
import copy
from datetime import (
UTC,
date,
datetime,
timedelta,
timezone,
)
import re
import zoneinfo
import dateutil.tz
from dateutil.tz import (
gettz,
tzoffset,
tzutc,
)
import numpy as np
import pytest
from pandas._libs.tslibs.dtypes import NpyDatetimeUnit
from p... |
b0a04565bc73f7cd9f207fe22b6343e228d7afc72c81d0773c6f45d24ebb6292 | Python | 63,862 | 1,846 | from decimal import Decimal
from functools import partial
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 import nanops
use_bn = nanops._USE_BOTTLENECK
@pytest.fixtu... |
84f8cdeb887cc43378c06a87f58dffaf9b7839db590663b9aa646b1f810e6b22 | Python | 63,934 | 1,693 | """Tests of the Rotation class."""
# based on Scipy implementation, which has the following copyright:
# Copyright (c) 2001-2002 Enthought, Inc. 2003-2024, SciPy Developers
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follo... |
6b48cde9dada9ac8bc73669a53b0b03838e4405b078a86f7f898ec5e2e220e95 | Python | 64,099 | 1,732 | # 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... |
a55619817a07729ec905550b97954892d754e6b38265a6036b8a1c1dce182367 | Python | 64,186 | 1,639 | from collections import namedtuple
from datetime import timedelta
import re
import numpy as np
import pytest
from pandas._libs import index as libindex
from pandas.compat import PY312
from pandas.errors import (
InvalidIndexError,
UnsortedIndexError,
)
import pandas as pd
import pandas._testing as tm
class... |
4d8cf05bd455f944618eddcb3a553103c047d0f7abdbbc5c0cd0524019d508b4 | Python | 64,387 | 1,931 | import builtins
import datetime as dt
from decimal import Decimal
from string import ascii_lowercase
import numpy as np
import pytest
from pandas._libs.tslibs import iNaT
from pandas.errors import Pandas4Warning
import pandas.util._test_decorators as td
from pandas.core.dtypes.common import pandas_dtype
from pandas.... |
91ccb2fe47e5900832c6490f2961f3946a96da8780acf9db106a8b824b7c98df | Python | 64,410 | 1,869 | """define the IntervalIndex"""
from __future__ import annotations
from operator import (
le,
lt,
)
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
cast,
)
import numpy as np
from pandas._libs import lib
from pandas._libs.interval import (
Interval,
IntervalMixin,
Inte... |
e4d8af10682e948578eff94de2257a6318f616f69363ea406dcedb10e02a2ad2 | Python | 64,457 | 1,781 | """
Tests for scalar Timedelta arithmetic ops
"""
from datetime import (
datetime,
timedelta,
)
import operator
import numpy as np
import pytest
from pandas.compat import PY313
from pandas.errors import (
OutOfBoundsDatetime,
OutOfBoundsTimedelta,
Pandas4Warning,
)
import pandas as pd
import pan... |
6c86f68f23da27690fcde3239366ecb3b3c5d1661e71893d3c5bcc1974358065 | Python | 64,515 | 1,951 | """
Routines for casting.
"""
from __future__ import annotations
import datetime as dt
import functools
from typing import (
TYPE_CHECKING,
Any,
Literal,
TypeVar,
cast,
overload,
)
import warnings
import numpy as np
from pandas._config import (
is_nan_na,
using_python_scalars,
us... |
ae8ecebbb8be0d5c36268f0184ce854884c9d3247c72185eaa126369a81bd703 | Python | 64,538 | 1,733 | from __future__ import annotations
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
@pytest.fixture
def mix_ab() -> dict[str, list[int | str]]:
retur... |
1150c523bfac36c0a399effc1fca831847a3040f3ffe797929f55ede0341d54b | Python | 64,589 | 1,708 | # 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... |
2387bfe16ab6dc8c929941589a0194ee84b297e052de6f38518b37ab443f0224 | Python | 64,670 | 1,592 | from __future__ import division
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from sklearn.decomposition import PCA
import time
import copy
import pickle, os
import nn_models as nm
## Common Input functions ##########################
def get_items(p): # se... |
48349d014b189fc51aad615605c32004202e9e96e8fb4c8f575418bcb080e429 | Python | 64,878 | 1,780 | import contextlib
from datetime import (
date,
datetime,
timedelta,
)
from decimal import Decimal
from functools import partial
from io import BytesIO
import os
import pathlib
import re
import uuid
import numpy as np
import pytest
from pandas.compat._optional import import_optional_dependency
import panda... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.