sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
97c6af3aa139e2b508e575379bbb3860dc7715f402614051d26bd6ff80239a77 | Python | 64,890 | 1,637 | # -*- coding: utf-8 -*-
'''
DBSCAN_GUI
PYSIMPLEGUI BASED GUI FOR DBSCAN CLUSTERING OF MOLECULAR TRAJECTORY DATA
Design and code: Tristan Wallis
Debugging: Sophie Huiyi Hou and Alex McCann
Queensland Brain Institute
University of Queensland
Fred Meunier: f.meunier@uq.edu.au
REQUIRED:
Python 3.8 or greater
... |
3ab93fb9db8e23e7f414b330be66c2007f6b92fae7419973a8ea27de76b952ca | Python | 65,158 | 1,749 | 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... |
5c80582cebc9e1fd599364910c571b3a7e9201d8d92f5d79649920f8adc24138 | Python | 65,232 | 1,779 | # 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... |
965f59036d31730f1ac1a35d0ef33e4395b6ee2c0993ea41427ff412aaf0ab7d | Python | 65,352 | 2,124 | from datetime import (
datetime,
timedelta,
)
import numpy as np
import pytest
from pandas.compat import (
IS64,
)
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
from pandas.api.indexers import BaseIndexer
from pandas.core.indexers.objects import VariableOffsetW... |
3c1d6e1105bc6c056a9dadfdd6cb86157cd94e3fac243e92c33a0aa723d3ad4a | Python | 65,583 | 1,775 | 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... |
656722badddbec410f0946461cb8a5dd34d9d635cac903a2e6374466fd18fe0e | Python | 65,638 | 1,973 | """
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... |
f4066ea5d522af2ae27c97efede1cc7243b2918fd8f2a4cd14e9e84a8b4083ff | Python | 65,724 | 1,828 | # Version: 0.16
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.3, 3.4, 3.5, and pypy
* [![Latest Version]
(https://py... |
db7613e70a514f189f7f058974aeaff78d42355bd77f5f2ab371ef9c9d3dd7c2 | Python | 65,909 | 1,900 | """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... |
b1547e3fba4f7148110a30bee7876cb2e33ff4cb7fc20f40107bffcc5d9b5ecb | Python | 65,956 | 1,415 | # 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... |
e32a8a8f8a5c7177643728f1a5985517bcb717145666bbb578c6d88c8b24232e | Python | 65,956 | 1,569 | #! /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... |
1a221f4d2353c9863cc950838dad79cc66d2ed21d0ba6d031e2acfa94f575ba7 | Python | 66,034 | 1,804 | 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... |
4055aa993fe91ca7ed7669113d61e5aeecca34b43705c0faf743c6c0eecfeed7 | Python | 66,174 | 1,791 | #slightly modified https://github.com/sokrypton/ColabFold/blob/main/colabfold/batch.py to save msa_first_row representation in .npy format as msa feature.
from __future__ import annotations
import os
os.environ["TF_FORCE_UNIFIED_MEMORY"] = "1"
os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "4.0"
import json
import ... |
06275bca5876ccb22759ba9bd36bad0fd88b780da578b6c3d8dc67bc28b2f024 | Python | 66,907 | 1,514 | """The 14-table data model for the PyCaret platform.
See docs/revamp/PLATFORM_PLAN.md § 3 for the design. Every table has a UUID
v4 string `id`, `created_at`, and `updated_at`. Most rows also carry
`created_by` (FK to users.id) — added explicitly (not via mixin) so the FK
target is resolvable at mapper-configuration t... |
247814ea2f926bdde295da78d5045088773edd145ad80667a73866a1ac4297af | Python | 66,955 | 1,882 | from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
from collections import abc
from itertools import islice
from typing import (
TYPE_CHECKING,
Any,
Generic,
Literal,
Self,
TypeVar,
final,
overload,
)
import warnings
import numpy as np
from pandas._con... |
eca90ffd0dfe245993fcdec1878cb9ee193f1db4de4a27b4e8bc800826056e11 | Python | 67,148 | 1,853 | """These are Validate KCSD classes written for the benefit of testing
true csd
"""
import time
import numpy as np
from numpy.linalg import LinAlgError
from scipy.linalg import inv
from scipy.integrate import simps
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from scipy.interpolate import griddata
from ... |
dcae58e4dc3ad00fb147288ec392c2eba8400d7641d03494b6d92037037ddc56 | Python | 67,156 | 1,838 | # 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... |
ddbd674dc6da6e2efe36b7d6f2621ebaffd34b05afda55c39c1033ed33dca4ea | Python | 67,226 | 1,899 | # cython: language_level=3
# Time-stamp: <2025-11-14 16:52:15 Tao Liu>
"""Module for PeakIO IO 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 mo... |
4549435e21f92e10c1399ea421294c066c4d8792572b3289237bcbee2a869adf | Python | 67,349 | 1,888 | from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
from collections import abc
from itertools import islice
from typing import (
TYPE_CHECKING,
Any,
Generic,
Literal,
Self,
TypeVar,
final,
overload,
)
import warnings
import numpy as np
from pandas._con... |
e4d2036702dfa191709e6763c16ab6ca6881c39ebde3226f81a29a77f94a324b | Python | 67,521 | 2,009 | """
Generic data algorithms. This module is experimental at the moment and not
intended for public consumption
"""
from __future__ import annotations
import decimal
import operator
from typing import (
TYPE_CHECKING,
Literal,
TypeVar,
cast,
overload,
)
import warnings
import numpy as np
from pan... |
7bf43080bf795819d8ed882a9b076ff6803518780ee344889bc70b983e570ffc | Python | 67,571 | 2,085 | import contextlib
from datetime import (
date,
datetime,
)
from decimal import Decimal
import numpy as np
import pytest
from pandas.compat import HAS_PYARROW
from pandas.errors import (
IndexingError,
Pandas4Warning,
)
from pandas.core.dtypes.common import is_list_like
import pandas as pd
import pan... |
36412eaf932a028e246f171135f2826365955f7f137a04dd645e129c095f233b | Python | 67,681 | 1,935 | from decimal import Decimal
from functools import partial
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
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
COMPLE... |
737466d9ecee15a9854e6701011b8a42c8c36eef4e8dcb77e6bcf0688037a87a | Python | 67,817 | 2,087 | """
Internal module for formatting output data in csv, html, xml,
and latex files. This module also applies to display formatting.
"""
from __future__ import annotations
from collections.abc import (
Callable,
Generator,
Hashable,
Mapping,
Sequence,
)
from contextlib import contextmanager
from csv... |
6ecdb9bcf894bcb8b1f1020f4f02843785ff940825ed9d46268bc8d25c97cfe3 | Python | 67,827 | 2,093 | import contextlib
from datetime import (
date,
datetime,
)
from decimal import Decimal
import numpy as np
import pytest
from pandas.compat import HAS_PYARROW
from pandas.errors import (
IndexingError,
Pandas4Warning,
)
from pandas.core.dtypes.common import is_list_like
import pandas as pd
import pan... |
7946b69edcd58c79b9e4df167244ad1498a2e5ca2056724f9424d5e9c00bbd7f | Python | 67,941 | 1,670 | # 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... |
88bd9fe6fa5ea2fda2d1e208e3f5a86b910e284aa8ed4e3757700520575245a6 | Python | 68,047 | 2,154 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 13 11:37:27 2020
@author: reisertm
"""
from tensorflow.keras import layers
import tensorflow as tf
import numpy as np
#import patchwork
custom_layers = {}
# https://stackoverflow.com/questions/61649083/tf-keras-how-to-reuse-resnet-layers-as-c... |
ee8d3c28b9dbdb722f7c50316e7e486ddd2201b80ce69823c1407d4812e52a28 | Python | 68,131 | 1,618 | """Test basic dataset functionality."""
import copy
import logging
import os
from unittest.mock import patch
import cv2
import imgaug.augmenters as iaa
import numpy as np
import pandas as pd
import pytest
import torch
from aniposelib.cameras import Camera
from PIL import Image
from lightning_pose.data.bboxes import ... |
c6917645899bbad1123d5b32489941dd01e54edd61c7cb8738b9982764efdc69 | Python | 68,261 | 1,966 | from collections import namedtuple
from datetime import (
datetime,
timedelta,
)
from decimal import Decimal
import re
import numpy as np
import pytest
from pandas._libs import iNaT
from pandas.compat import PY315
from pandas.core.dtypes.common import is_integer
import pandas as pd
import pandas._testing as... |
54bc6e4d73b3b9aab5dfd8e9599b4ead9234f990c191421b5b4032742e069819 | Python | 68,279 | 2,044 | import numpy as np
import sys
def get_Askervein_measurements(name):
'''
Get the measurements form the Askervein experiment from the specified run.
Parameters
----------
name : str
Name of the requested run
Returns
-------
data : dict
Dictionary with the measuremen... |
c045f4d74efe2429eb47fe21f58aa6065d3630907a2517ee3b64d194d1337eae | Python | 68,294 | 2,158 | from __future__ import annotations
import functools
import itertools
from typing import (
TYPE_CHECKING,
Any,
Literal,
cast,
)
import warnings
import numpy as np
from pandas._config.config import _global_config as config
from pandas._libs import (
NaT,
NaTType,
iNaT,
lib,
)
import pa... |
806c33158c42f58e8f749a496d806eaf20f21a5591476d65aa4c4e8c63abc61a | Python | 68,448 | 1,970 | from __future__ import annotations
import operator
from operator import (
le,
lt,
)
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
TypeAlias,
overload,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._libs.interval import (
VALID_CLOSED,
... |
fa475f89bbeb69ec5b51cae1f09859cb262a16c2176e628bca41237c432554d3 | Python | 68,460 | 1,592 | """ Introduction
--------------------
This package provides tools for estimating multidimensional
integrals numerically using an enhanced version of
the adaptive Monte Carlo |vegas| algorithm (G. P. Lepage,
J. Comput. Phys. 27(1978) 192, and J. Comput. Phys. 439(2021)
110386).
A |vegas| code generally involves two o... |
a9ad6cb0a17aa229e6cbcdef98b6b3724dd2d2b65fc81550a00f0744f62916bb | Python | 68,832 | 1,748 | # -*- coding: utf-8 -*-
'''
VORONOI_GUI
PYSIMPLEGUI BASED GUI FOR VORONOI CLUSTERING OF MOLECULAR TRAJECTORY DATA
Design and code: Tristan Wallis
Debugging: Sophie Huiyi Hou
Queensland Brain Institute
University of Queensland
Fred Meunier: f.meunier@uq.edu.au
REQUIRED:
Python 3.8 or greater
python -m pip... |
852ce345e287bf64ddfd5928a1fa6ef7065a1670cf2aac495e3d9bafe5eacebb | Python | 68,896 | 1,842 | # 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 ... |
6df29c68c4aaeebdfaaf4b083adea09afeaf3239dbb9f5abaa6879c5e3fc6d32 | Python | 68,994 | 1,625 | import os
import time
from copy import deepcopy
import numpy as np
import numpy.linalg as la
import logging
import h5py
import glob
from warnings import warn
from . import conjugateGradient as cg, kernelFunctions as kfun, pointEvolution as evol, bfgs, sgd
from . import surfaces, surface_distances as sd
from . import po... |
a165dcb1b752a1d230154fd266b0cff5ee243cea9377e3314d6e185ae90d44f3 | Python | 69,032 | 1,939 | from datetime import (
date,
datetime,
timedelta,
)
from decimal import Decimal
import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.core import nanops
from pandas.core.arrays.string_arrow import ArrowStringArray
def get_objs():
indexes = [
pd.Index([... |
ac7b7dfd5d590dbab06439a3f07678a1d6cf09064197c4764a1c0b31919f9fd1 | Python | 69,105 | 2,046 | """
Generic data algorithms. This module is experimental at the moment and not
intended for public consumption
"""
from __future__ import annotations
import decimal
import operator
from typing import (
TYPE_CHECKING,
Literal,
TypeVar,
cast,
overload,
)
import warnings
import numpy as np
from pan... |
ae2fb2aa9a0d87e302fb06939536b36c2533b5ff301fc18398c09ec3ce1d8852 | Python | 69,106 | 1,725 | import numpy as np, os, pickle, gc
import pumpprobe as pp, mistofrutta as mf
from scipy.optimize import root,minimize,least_squares
import matplotlib.pyplot as plt
class Fconn:
'''Class representing the functional connectome extracted from a dataset.'''
folder = ""
"Folder containing the dataset"
n_ne... |
af46ab2d695acba13f447bbe6276845deee8e538dfb6aa9bc1c1c5e608309ae6 | Python | 69,540 | 1,986 | from __future__ import annotations
import operator
from operator import (
le,
lt,
)
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
TypeAlias,
cast,
overload,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._libs.interval import (
VALID_CL... |
5d16262f5d838ced11e4f6ff5c57542261bb92c0487ff0795eedcbbe5fb8b4be | Python | 69,575 | 2,032 | import logging
from numba import jit, prange, int64
import numpy as np
cupy_available = True
try:
import cupy as cp
except:
print('cannot import cupy')
cupy_available = False
from math import pi
from pykeops.numpy import Genred, LazyTensor
import pykeops
pkfloat = 'float64'
c_ = np.array([[1,0,0,0,0],
... |
c0b4030a3b1e2f7a0fa47f5006a2a394683b0a9b76ddead314537fc9c411b387 | Python | 69,580 | 2,006 | from collections import namedtuple
from datetime import (
datetime,
timedelta,
)
from decimal import Decimal
import re
import numpy as np
import pytest
from pandas._libs import iNaT
from pandas.compat import PY315
from pandas.core.dtypes.common import is_integer
import pandas as pd
import pandas._testing as... |
cb2af48cc8c4ba37ee4359b24e0a19934b0f82c7c16c9e1f0eafc07c60f3599e | Python | 69,639 | 1,891 | # 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... |
0a6bd3e73dffbd7d8a810bde9da81ce9c6a0b62093460850a3341a06f8a2f39f | Python | 69,650 | 1,394 | #! /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... |
2885139c612a381029acf26d1d0b0c5a6404aa57fa84a2261b40e2fea9d2df65 | Python | 69,665 | 2,031 | # 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... |
b3288bc3835a522411c30cf52967cb2dde3493365ff3821c7db4ba73cce9cadb | Python | 69,770 | 1,861 | """Qt widgets for GUIs."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import ast
import inspect
import json
import logging
import math
import re
from collections.abc import Mapping
from cont... |
a13ec3efc010622980147f96839b122c97e67bfffd51303e2a795085693804e1 | Python | 69,923 | 1,733 | # 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... |
641f85711f869ec418a80813c2506169678ffe4dc5d08ce13e9d688f8330e91e | Python | 69,926 | 1,996 | from collections import defaultdict
from datetime import datetime
from functools import partial
import math
import operator
import re
import numpy as np
import pytest
from pandas.compat import IS64
from pandas.errors import (
InvalidIndexError,
Pandas4Warning,
)
import pandas.util._test_decorators as td
from... |
39478930081b1eed876e8bb768fc106b0662d621d98e8e5e59df222d686ae736 | Python | 70,055 | 1,651 | from numpy import (array, unravel_index, nditer, linalg, random, subtract, max,
power, exp, zeros, ones, arange, outer, meshgrid, dot,
logical_and, mean, cov, argsort, linspace, float64,
einsum, prod, nan, sqrt, hstack, diff, argmin, multiply,
... |
19e8cd74038ee6cb6338f6e6520f4a8d47709cf32ea7deaa96716cb3ad2a7b8d | Python | 70,097 | 1,628 | import sys
import tempfile
import types
import pytest
import numpy as np
from MACS3.Signal.FixWidthTrack import FWTrack
from MACS3.Signal.CallPeakUnit import CallerFromAlignments
from MACS3.Signal.PairedEndTrack import PETrackI
from MACS3.IO.PeakIO import PeakIO
# ----------------------------------------------------... |
00367ceaf0422e4c3a19e443e9d87a43149854153cc4786c4ac87971fed6da27 | Python | 70,244 | 2,198 | from __future__ import annotations
import functools
import itertools
from typing import (
TYPE_CHECKING,
Any,
Literal,
cast,
)
import warnings
import numpy as np
from pandas._config.config import _global_config as config
from pandas._libs import (
NaT,
NaTType,
iNaT,
lib,
)
import pa... |
16755fe3629dbe5670729930afd0f08d80bed4ad437b4b266f2aac208f9f7be5 | Python | 70,473 | 2,008 | from collections import defaultdict
from datetime import datetime
from functools import partial
import math
import operator
import re
import numpy as np
import pytest
from pandas.compat import IS64
from pandas.errors import (
InvalidIndexError,
Pandas4Warning,
)
import pandas.util._test_decorators as td
from... |
18d1f339d0f54eabf32186939c5c6450c234d7de011f2eb2bf5bda25489f80de | Python | 70,485 | 1,922 | from __future__ import annotations
from datetime import (
datetime,
time,
)
from functools import partial
from io import BytesIO
import os
from pathlib import Path
import platform
import re
from urllib.error import URLError
import uuid
from zipfile import BadZipFile
import numpy as np
import pytest
from pand... |
5cb3f6c57e4432b015e5ca763872c68402bdebe2e1f02e903bfd8e8df4504046 | Python | 70,571 | 1,512 | # 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... |
a3ce94b972d61dc7d2ae60d27090639b9eb4f66213b00e8fc70cb2db4670beb0 | Python | 70,646 | 1,761 | import numpy as np, os, pickle, gc
import pumpprobe as pp, mistofrutta as mf
from scipy.optimize import root,minimize,least_squares
import matplotlib.pyplot as plt
class Fconn:
'''Class representing the functional connectome extracted from a dataset.'''
nan_thresh = 0.05
'''Global nan threshold'''
... |
29d0816199a4db4dce1b7c2f3edc4d145c66831d052113158310cc7f5b850392 | Python | 70,767 | 2,043 | """Self-Assembling Manifold (SAM) algorithm for single-cell RNA sequencing analysis.
This module contains the main SAM class that implements iterative manifold-aware
feature weighting for single-cell analysis.
Copyright 2018, Alexander J. Tarashansky, All rights reserved.
Email: <tarashan@stanford.edu>
"""
from __fu... |
9abe32f953d1e0a2cde3b1eaef31f44ef6045dfe5964c6cf83c6ece091b2e340 | Python | 70,779 | 1,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... |
5f838b919a71917b90e91faeb01d4293e4265c98addd1ee496530e2e745130d3 | Python | 70,807 | 1,832 | # 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... |
af2e78551f8a74f1cf325db423c77744ff4e069c0b1e6d84ad4f96132f4323e1 | Python | 70,833 | 1,777 | # Copyright 2021-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... |
bdb34b1b0d400e3c63d60b0e28e40a9d38eeb359bf8180909ec419334b82213f | Python | 71,233 | 1,763 | # 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 ... |
eedbb786e34be157bf6a89dc87a26bd825c711e86fb13ba1df9770227f373039 | Python | 71,667 | 2,220 | # 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... |
f4af2d052fb38f9d61377250394108854fb1f463e4e616b80f1ad10dfbe5293b | Python | 71,749 | 1,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... |
9c4c55477f294274c65132a3f6e8fbfd60249334d4a68bcddf836944c9162b72 | Python | 71,754 | 1,255 | import matplotlib.pyplot as plt
import numpy as np
from matplotlib import colors
from scipy import signal
from scipy import stats
from scipy import interpolate
from astropy.timeseries import LombScargle
from astropy.convolution import convolve, Gaussian1DKernel
from eLife_Grid_anchoring_2024.FieldShuffleAnalysis.shu... |
3b9ccaa02aa9c83a2b4a27bc2934b5b60abfe5cebabab67145eea487a28c7b71 | Python | 71,906 | 2,025 | from datetime import (
date,
datetime,
timedelta,
)
from decimal import Decimal
import numpy as np
import pytest
from pandas.compat import HAS_PYARROW
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
from pandas.core import nanops
from pandas.core.arrays.string_ar... |
8c6b9d7cd0ddf19191602d82a9a0b9a2e13755b1c99b3cb3e51843a797bc1a19 | Python | 71,924 | 1,960 | from __future__ import annotations
from datetime import (
datetime,
time,
)
from functools import partial
from io import BytesIO
import os
from pathlib import Path
import platform
import re
from urllib.error import URLError
import uuid
from zipfile import BadZipFile
import numpy as np
import pytest
from pand... |
1de9de31ea086fc842cc44f07c4618a5d92f1f6b6a8269d8530e20cbe90b5265 | Python | 71,935 | 1,574 | # -*- coding: utf-8 -*-
"""
Created on Sat Jan 14 13:14:34 2023
@author: lonya
"""
# # local function
# In[36]:
import numpy as np
import pandas as pd
from scipy import signal
from scipy.signal import hilbert
from scipy.signal import savgol_filter
from scipy.ndimage import gaussian_filter
from scipy.stats ... |
96a22700acf7e733127f944470bf955179c7886e57b7ede826d6fbd1c64e4ec4 | Python | 72,097 | 1,973 | # cython: language_level=3
# Time-stamp: <2025-11-20 10:58:03 Tao Liu>
"""Scoring utilities for MACS3 signal tracks and peak callers.
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).
"""
# ------------------... |
2496b3f36c9bdca65c4ef75b1572816e562fd4e5dc7503cb79b40878824df16b | Python | 72,549 | 2,127 | import logging
from numba import jit, prange, int64
import numpy as np
cupy_available = True
try:
import cupy as cp
except:
print('cannot import cupy')
cupy_available = False
from math import pi
import pykeops
#import socket
#pykeops.set_build_folder("~/.cache/keops"+pykeops.__version__ + "_" + (socket.ge... |
9d93ba283b3697d61503761e1bdef7497a45e9224a096a1f4d91710345bb998f | Python | 72,578 | 1,793 | import matplotlib
import os
import numpy as np
from numba import jit, int64
import pandas as pd
from scipy.interpolate import LinearNDInterpolator
from scipy.spatial import Delaunay
import scipy as sp
import scipy.linalg as LA
from scipy.sparse import csr_matrix, lil_matrix
from .curves import Curve
from .surfaces impo... |
ed4377c769b64e77841bacd4d854904905b5cc30939a05868bfeab640957f9ab | Python | 72,782 | 2,260 | from datetime import datetime
import warnings
import numpy as np
import pytest
from pandas.compat import is_platform_arm
from pandas.core.dtypes.dtypes import CategoricalDtype
import pandas as pd
import pandas._testing as tm
from pandas.tests.apply.conftest import MockEngineDecorator
from pandas.tests.frame.common ... |
3b3e902ebc1def17d564add72763bbc7405d3c9e54c452a8be075d04bd36a2c6 | Python | 72,818 | 2,211 | """
Internal module for formatting output data in csv, html, xml,
and latex files. This module also applies to display formatting.
"""
from __future__ import annotations
from collections.abc import (
Callable,
Generator,
Hashable,
Mapping,
Sequence,
)
from contextlib import contextmanager
from csv... |
b9edeb79f3d2226ce866ef8b7c9ea919c2a08de87acf952b7dd8858825486d63 | Python | 73,227 | 1,866 | """
Tests that apply specifically to the CParser. Unless specifically stated
as a CParser-specific issue, the goal is to eventually move as many of
these tests out of this module as soon as the Python parser can accept
further arguments when parsing.
"""
from decimal import Decimal
from io import (
BytesIO,
St... |
367587172eb2d78834d20dbd0cf701322c8378368f48f9679765e3697aab331b | Python | 73,269 | 1,592 | # 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... |
fb682d1aed2da254017c75a73bb7dad39362edf180d2b423b3ed875a25c26c60 | Python | 73,553 | 1,865 | # Created by G. Peter Lepage (Cornell University) in 12/2013.
# Copyright (c) 2013-21 G. Peter Lepage.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any... |
4be51ed19736b3edba45cf8edcf435d72a634c703e96f4060f8611f741fe9658 | Python | 73,650 | 2,127 | # 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... |
6256112629e572e765b72a524027578d91a62735ef78124d90dac633990d4a42 | Python | 73,879 | 2,261 | import os
import sys
import numpy as np
from numba import jit, prange
import vtk
import array
from PIL import Image
import struct
class gridScalars:
def __init__(self, data=None, fileName = None, dim = 3):
if not (data == None):
self.data = np.copy(data)
elif not (fileName==None):
if (... |
8a0559058e128275380e85bae7e9316b6cfd7e40f220890dd6a80416c3be1ac3 | Python | 74,130 | 2,295 | from datetime import datetime
import warnings
import numpy as np
import pytest
from pandas.compat import is_platform_arm
from pandas.core.dtypes.dtypes import CategoricalDtype
import pandas as pd
import pandas._testing as tm
from pandas.tests.apply.conftest import MockEngineDecorator
from pandas.tests.frame.common ... |
79c128a6c279c73684b08f07cd87c8669cccf05ee9cab8930b174794a248dfc9 | Python | 74,351 | 1,993 | # 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... |
577ab53dfb67ea6bfd1a50022e5c165b7e24f16f81ae69aeac9950127ded0a48 | Python | 74,605 | 1,780 | # 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... |
5c70d257fa4b917d8a09c3c255d39eb48771440cc70b43e1a37a640da645af45 | Python | 75,081 | 2,256 | """
test .agg behavior / note that .apply is tested generally in test_groupby.py
"""
import datetime
import functools
from functools import partial
import numpy as np
import pytest
from pandas.errors import (
Pandas4Warning,
SpecificationError,
)
import pandas.util._test_decorators as td
from pandas.core.dt... |
240a431bcb0bed4785460e83f2129114eb1684e5c3e1f0c81adc491867db80d2 | Python | 75,228 | 1,680 | # -*- coding: utf-8 -*-
from sdna.net.core.interleaver import *
from sdna.net.core.layers import *
class EncoderBase(torch.nn.Module):
def __init__(self, arguments):
"""
Class serves as a encoder template, it provides utility functions.
:param arguments: Arguments as dictionary.
... |
a10e98c8980163a16b28bc87849ffe53f7289a1d5b18f3c0a7bcbd06ee0be938 | Python | 75,434 | 1,929 | import os # system library
import numpy as np # for any numeric processing
import ctypes # for interfacing with C-like data-types (pointers) used in the shared library
import time # for computational performance
import matplotlib # for plotting variables & results
import matplotlib.pyplot as plt
import scipy.io #... |
7dc6a858d41a7f7ace048ce0863e2b400f5747dd75abfe9ae2f6dcd4fe7fba28 | Python | 75,799 | 2,106 | from datetime import datetime
import re
import numpy as np
import pytest
from pandas._libs import lib
import pandas.util._test_decorators as td
import pandas as pd
import pandas._testing as tm
from pandas.tests.strings import (
_convert_na_value,
is_object_or_nan_string_dtype,
)
# --------------------------... |
b1901af39a8ef617ae09f12d24d4e78e432007573821af0f09e1902f0c837d03 | Python | 75,993 | 2,023 | """
norm_data module
===============
This module provides functionalities for normalizing and converting different types of data into a NormData object.
The NormData object is an xarray.Dataset that contains the data, covariates, batch effects, and response variables, and it
is used by all the models in the toolkit.
... |
b51a03c6e1eb7500d7d4f0573e60c7d1c907ef3c7ec39b7be96656d9343a2f85 | Python | 76,345 | 1,618 | # -*- coding: utf-8 -*-
import torch
from sdna.net.core.layers import *
from sdna.net.core.interleaver import *
import numpy as np
class CoderBase(torch.nn.Module):
def __init__(self, arguments):
"""
Class serves as the coder template, it provides utility functions.
:param arguments: Argu... |
c8f4fc0c8f2e6788139273edc272e69a9fee4518559d70ff6474a36cb79b1808 | Python | 76,454 | 1,569 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Step S6 (CheckM branch): Contig retrieval from PE-supported connections.
CheckM-specific implementation of contig retrieval using PE links
and coverage information.
"""
import pandas as pd
# import seaborn as sns
# import matplotlib.pyplot as plt
from Bio import SeqI... |
7307e3c8c5a0953bba058124ccfb0de5effd8d682aba9a0deb8e4ffd3706ff70 | Python | 76,477 | 1,989 | from __future__ import annotations
from collections.abc import (
Callable,
Hashable,
Iterable,
Mapping,
Sequence,
)
import datetime
from decimal import Decimal
from functools import partial
import os
import sys
from typing import (
IO,
TYPE_CHECKING,
Any,
Generic,
Literal,
S... |
48af3734dc7dd0a0efdbf19b6b9560fa691779a71fb66bddca50c443ce4974f3 | Python | 76,886 | 2,367 | # 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... |
7690af1d22bbfc1b880c84386e69918d33d5126663faef1c12d688f72b47c65a | Python | 77,137 | 1,981 | """
Tests that apply specifically to the CParser. Unless specifically stated
as a CParser-specific issue, the goal is to eventually move as many of
these tests out of this module as soon as the Python parser can accept
further arguments when parsing.
"""
from decimal import Decimal
from io import (
BytesIO,
St... |
4c7653f34941651489ec36a5aa210aca1c63844079390000d25a9468b33fdfd9 | Python | 77,340 | 1,810 | # Import the required libraries and modules
import numpy as np
import scipy
from scipy.integrate import quad
from scipy.stats import norm
from itertools import combinations
import sys as sys
from scipy.spatial.distance import cdist
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
from sklearn.mixtur... |
9de65d4ef7a2fb9b1b93de3175bd25c72e91ae1b31ab0c9b350eaee075e0041b | Python | 77,383 | 2,005 | from __future__ import annotations
from collections.abc import (
Callable,
Hashable,
Iterable,
Mapping,
Sequence,
)
import datetime
from decimal import Decimal
from functools import partial
import os
import sys
from typing import (
IO,
TYPE_CHECKING,
Any,
Generic,
Literal,
S... |
ac5cdd8072e7ecbe205b70bf59fb135c8fdd8618f26f486c7770d24b4c803a38 | Python | 77,500 | 2,043 | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 17 11:06:32 2020
@author: kerschensteinerlab
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy.signal import savgol_filter
from tkinter import filedialog
from tkinter import *
import sys
from PyQt5.QtWidgets import (QLabe... |
988595d16015fc693761d88631c0c102fae2ad969cd887f2ef3a23c16bdad2c7 | Python | 77,869 | 2,341 | """
test .agg behavior / note that .apply is tested generally in test_groupby.py
"""
import datetime
import functools
from functools import partial
import numpy as np
import pytest
from pandas.errors import (
Pandas4Warning,
SpecificationError,
)
import pandas.util._test_decorators as td
from pandas.core.dt... |
4b21f1ddc541082d86e0335134c23ae7e698963ecc8f68fb87a43c3b60007ca9 | Python | 78,245 | 2,280 | from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
cast,
overload,
)
import warnings
import numpy as np
from pandas._config import (
is_nan_na,
using_python_scalars,
)
from pandas._libs import (
algos as libalgos,
groupby as libgroupby,... |
579adc2db58bd7fc23e65328aff6631e60b334b53f40e91c8ac6463736a3f661 | Python | 78,352 | 2,151 | from __future__ import annotations
from itertools import product
import numpy as np
import pytest
from pandas.compat import (
PY312,
PY314,
)
from pandas.compat._optional import import_optional_dependency
from pandas.errors import (
NumExprClobberingError,
Pandas4Warning,
PerformanceWarning,
... |
b95ca087a9f3ab850c099ea2b5b7cb101a2ab94d57ddce2d95f8569beea76882 | Python | 78,675 | 1,673 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import logging
import shutil
import subprocess
import tempfile
import textwrap
import filecmp
import pytest
from unittest import TestCase, skip, TestLoader, TextTestRunner, expectedFailure
from urllib.parse import urlparse
from uuid import uuid4
import os, sys
import argparse... |
50e182f60ab33bcb54eaee0fe3bf15106049ed58d5492b51e6b8f825af47425d | Python | 78,846 | 2,148 | """
test date_range, bdate_range construction from the convenience range functions
"""
from datetime import (
datetime,
time,
timedelta,
)
import re
import numpy as np
import pytest
from pandas._libs.tslibs import timezones
from pandas._libs.tslibs.offsets import (
BDay,
CDay,
DateOffset,
... |
673ecb5faef12aa7a6342965665a5451b3216e0f2c0f2ed2fc2e48c6ab7212d9 | Python | 78,907 | 2,166 | """Classes for performing power analysis on data.
CLASSES
-------
PowerMorlet
- Performs power analysis on preprocessed data using Morlet wavelets.
"""
from copy import deepcopy
from typing import Union
from matplotlib import pyplot as plt
from fooof import FOOOF
from fooof_PLA import FOOOF as FOOOF_PLA
from fooof.... |
0edbb38a0d060b3a21bb805c3323d1cad69ebd213e8e57977a4d89225b427622 | Python | 79,362 | 2,355 | from datetime import datetime
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
from pandas.api.typing import SeriesGroupBy
from pandas.tests.groupby import get_groupby_method_args
def cartesian_product_for_groupers(result, args, names, fill_... |
2da8d0474a4fe0e054499614af10f3f4987b031401b9c94e3dcff698c2402890 | Python | 79,541 | 2,261 | """
These test the public routines exposed in types/common.py
related to inference and not otherwise tested in types/test_common.py
"""
import collections
from collections import namedtuple
from collections.abc import Iterator
from datetime import (
UTC,
date,
datetime,
time,
timedelta,
)
from dec... |
4d6a55a4398a8b930242ccea7e21ead5ec72a800a9df4ed54e82f86baf1c7304 | Python | 79,555 | 2,262 | """
These test the public routines exposed in types/common.py
related to inference and not otherwise tested in types/test_common.py
"""
import collections
from collections import namedtuple
from collections.abc import Iterator
from datetime import (
UTC,
date,
datetime,
time,
timedelta,
)
from dec... |
b22d44566b08d9993129b0f99380c89cdcfc462c1896d4d354748fcb1bc747b7 | Python | 79,986 | 1,536 | """Test support for mocking GraphQL queries"""
_list_attrs_resp = {
"data": {
"datasetClass": {
"attributes": [
{"name": "basis_rot_groupings"},
{"name": "basis_rot_samples"},
{"name": "dipole_op"},
{"name": "fci_energy"},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.