sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 17k | content stringlengths 1 200k |
|---|---|---|---|---|
e62df619c43cc1a7a30cf64cc56818187085880473ad9abff0339ee3f239b1d5 | Python | 67,982 | 1,388 | # -*- coding: utf-8 -*-
# Time : 2022/9/29 15:27
# Author : Regulus
# FileName: main_transfer.py
# Explain:
# Software: PyCharm
import argparse
import math
import time
import CKA
import numpy
import timm.models
import random as rd
import yaml
import os
import logging
from collections import OrderedDict
fro... |
9677a5d42646999aa645d4c6e65b46c152a5f460a1414d3bbfcbb21b6e5c8b59 | Python | 69,737 | 2,340 | """
Tests date parsing functionality for all of the
parsers defined in parsers.py
"""
from datetime import (
date,
datetime,
timedelta,
timezone,
)
from io import StringIO
from dateutil.parser import parse as du_parse
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs import parsin... |
8b8e035c21c406d2ad3b3c1205f00387f9014a330f81a0896077457eceac7c24 | Python | 70,150 | 1,751 | import warnings
import pytest
import numpy as np
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_warns,
assert_no_warnings, assert_array_equal, assert_array_almost_equal,
suppress_warnings, IS_WASM
)
from numpy import random
import sys
class TestSeed:
def... |
5c872aede25fb89800b08d59819f84a23c37d9f481ce1ad0a90b1be1a3327049 | Python | 70,208 | 2,024 | 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.errors import (
InvalidIndexError,
PerformanceWarning,
SettingWithCopyError,
)
import pandas.util._test_... |
b77042870328059c1f574e48cbf9f7a21db7db1be2d5239190e25f1c52ff73ef | Python | 70,318 | 2,442 | #
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
# Please remember to run "make -C docs html" after update "desc" attributes.
import argparse
import copy
import grp
import inspect
import ipaddress
import os
import pwd
import re
import shlex
import ssl
import sys... |
78c1df0c58f6d4a70abaff3e696870766deb1e1222aed524649b2cf907df820c | Python | 70,456 | 1,929 | import warnings
import sys
import os
import itertools
import pytest
import weakref
import re
import numpy as np
import numpy._core._multiarray_umath as ncu
from numpy.testing import (
assert_equal, assert_array_equal, assert_almost_equal,
assert_array_almost_equal, assert_array_less, build_err_msg,
assert_... |
65bb1e66638a083d5fe70f0d64ff3ae13b643964f0e5ce4acf33cdaa6645791e | Python | 70,630 | 2,321 | """
Masked arrays add-ons.
A collection of utilities for `numpy.ma`.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
__all__ = [
'apply_along_axis', 'apply_over_axes', 'atleast_1d', 'atleast_2d',
'atleast_3d', 'average'... |
b8d119104f5c811d93dd94ded2906577dae76eea72c795e295b423fcf9a2076d | Python | 70,781 | 2,047 | """
These the 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 (
date,
datetime,
time,
timedelta,
)
from decimal i... |
91adb20c09bac970d00b9ae92f2c4b1d8abcd172101a15d4b78454511bd88d29 | Python | 71,109 | 2,055 | import numpy as np
import pytest
from pandas.errors import SettingWithCopyWarning
import pandas as pd
from pandas import (
DataFrame,
Index,
MultiIndex,
Period,
Series,
Timestamp,
date_range,
option_context,
period_range,
)
import pandas._testing as tm
from pandas.tests.copy_view.u... |
b4024334bc2eafa049504a94cce71edc6af651cae925614713b7510e2e077dbe | Python | 71,739 | 2,001 | from __future__ import annotations
from functools import reduce
from itertools import product
import operator
import numpy as np
import pytest
from pandas.compat import PY312
from pandas.errors import (
NumExprClobberingError,
PerformanceWarning,
UndefinedVariableError,
)
import pandas.util._test_decorat... |
db4a13817670cd34037ea058ea0fc74fd0ac19dd5192e36d9eed1813eaed3b95 | Python | 71,826 | 2,125 | from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
from collections.abc import (
Hashable,
Iterable,
Iterator,
Sequence,
)
from typing import (
TYPE_CHECKING,
Any,
Literal,
cast,
final,
)
import warnings
import matplotlib as mpl
import numpy as np
... |
9fcffcd3d9f5a1123e836dd7acd0143ab8f6bd1b4a32b1468d011be51576055f | Python | 71,879 | 1,723 | import os, warnings
import tonic
from tonic import DiskCachedDataset
import torch
import torch.nn.functional as F
import torch.utils
import torchvision.datasets as datasets
from timm.data import ImageDataset, create_loader, Mixup, FastCollateMixup, AugMixDataset
from timm.data import create_transform
from torchvisi... |
f175a7aa4d1e5168d50ec5fe711adbbf0ed2f0040d682944f915edde5de2e9ba | Python | 71,993 | 1,774 | # -*- coding: utf-8 -*-
"""
The lattice module for defining and manipulating lattice geometries.
"""
import logging
import abc
from typing import (
Any,
Dict,
Hashable,
Iterator,
List,
Optional,
Tuple,
Union,
TYPE_CHECKING,
cast,
Set,
)
import itertools
import math
import n... |
817e8d50a80240abee15348039b86a7eba9021722cc6728840e73e85e3a7eebb | Python | 72,150 | 2,028 | """
Functions that ignore NaN.
Functions
---------
- `nanmin` -- minimum non-NaN value
- `nanmax` -- maximum non-NaN value
- `nanargmin` -- index of minimum non-NaN value
- `nanargmax` -- index of maximum non-NaN value
- `nansum` -- sum of non-NaN values
- `nanprod` -- product of non-NaN values
- `nancumsum` -- cumul... |
394940a67aa2cf5fc30f17bca735a9501d2b2ec58854e9a5aa93e82ca166d58f | Python | 72,605 | 2,047 | from typing import Callable, Dict, Optional
import hypothesis.strategies as st
import pytest
from hypothesis import given
import numpy as np
import pandas as pd
from scipy.sparse import csc_matrix, csr_matrix, issparse, load_npz, spmatrix
from sklearn.neighbors import NearestNeighbors
from anndata import AnnData
fr... |
e76c8e16e77a1b47c0040939754d77be8fa1af778bb98428f5a2a1d5205adb2a | Python | 72,647 | 1,275 | import pickle
import numpy as np
import os
from scipy.stats import ttest_ind
from sklearn.metrics import f1_score,roc_curve
atlas = 'AAL' #choose atlas (AICHA, AAL)
save_path = r'' #here, enter the path where the results are saved
with open(os.path.join(save_path,'results_ABIDEI',atlas,'ABIDEI_VarCoNet_resul... |
c52dec38f8c513300b947a707be4cc0110dd574c64a70050f0d92a28c76103d2 | Python | 73,152 | 2,136 | from collections import deque
from datetime import (
datetime,
timezone,
)
from enum import Enum
import functools
import operator
import re
import numpy as np
import pytest
from pandas._config import using_pyarrow_string_dtype
import pandas.util._test_decorators as td
import pandas as pd
from pandas import ... |
f51a42425e57f3c0479652623ec1cf876f791e1d2e029bf0149350baeb542de3 | Python | 74,131 | 1,998 | """Compiles nodes from the parser into Python code."""
import typing as t
from contextlib import contextmanager
from functools import update_wrapper
from io import StringIO
from itertools import chain
from keyword import iskeyword as is_python_keyword
from markupsafe import escape
from markupsafe import Markup
from ... |
3cdd15271a94ab304aae9391aa81774b4d8020bcf6537fb002b48dce0d856ab5 | Python | 74,221 | 1,500 | """
Functions to run designer preprocessing steps
Includes:
run_denoising:
run_degibbs:
run_eddy:
run_b1correct:
create_brainmask:
run_rice_bias_correct:
run_normalization:
"""
import time
import shutil
from pathlib import Path
from lib.utils import run_fsl_eddy, run_topup_and_prepare_for_eddy, write_rpe_all_p... |
fdb37064885c8f4bbb93d34ce51899dd5cfe194b0fee73a2ddc1d8952af95c14 | Python | 74,232 | 1,863 | """
Quantum circuit: common methods for all circuit classes as MixIn
Note:
- Supports qubit (d = 2) and qudit (d >= 2) systems.
- For string-encoded samples/counts when d <= 36, digits use base-d characters 0-9A-Z (A = 10, ..., Z = 35).
"""
# pylint: disable=invalid-name
from typing import Any, Callable, Dict, L... |
ef7363adbdd81fa7c63272fef71d7fae54f8fe319139d339b1521078245a53e0 | Python | 74,271 | 2,169 | from datetime import datetime
import numpy as np
import pytest
import pandas as pd
from pandas import (
Categorical,
CategoricalIndex,
DataFrame,
Index,
MultiIndex,
Series,
qcut,
)
import pandas._testing as tm
from pandas.api.typing import SeriesGroupBy
from pandas.tests.groupby import get... |
c9032a3e962455cac7e8c9e01e5b4f6bdb950dde67f87bfc8e0cbe8d054222fb | Python | 74,496 | 2,231 | from datetime import datetime
from functools import partial
import numpy as np
import pytest
import pytz
from pandas._libs import lib
from pandas._typing import DatetimeNaTType
from pandas.compat import is_platform_windows
import pandas.util._test_decorators as td
import pandas as pd
from pandas import (
DataFra... |
04b59799f7ebdb25aef2a68ef485651e5c275fe050ad2324de18e2d3238e315e | Python | 75,577 | 1,721 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2023.2.3),
on June 19, 2024, at 14:20
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, L... |
0d22a798e8c9fc7a6c24c49dd6794e3e71097ce22b1858178d22ba4151ce374b | Python | 75,577 | 1,721 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2023.2.3),
on June 19, 2024, at 13:53
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, L... |
52c477b2c975df1cf8fc776694f8db2fb92cac93dd54937ecd1ac8161d31bd51 | Python | 75,577 | 1,721 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2023.2.3),
on June 19, 2024, at 13:16
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, L... |
7064b5062741bcad2c35e115009bdc927cd9b9de7f633197b8bf5131ddda9eb7 | Python | 75,577 | 1,721 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2023.2.3),
on June 19, 2024, at 14:07
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, L... |
fa03fa8d1434ea02a03761939aeb4545f8578ead1e33c6da314e3ec77e06f479 | Python | 75,577 | 1,721 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2023.2.3),
on June 19, 2024, at 13:39
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, L... |
fd5386c43b8ed580491c6c77e8a4f0f43e505b74551487dd81aafa4f336e901c | Python | 75,577 | 1,721 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2023.2.3),
on June 19, 2024, at 14:34
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, L... |
c373fa029841a5315406a7592e9277eb3887db761d306307d2bef92ac4ce6d8b | Python | 76,035 | 2,348 | """
Define extension dtypes.
"""
from __future__ import annotations
from datetime import (
date,
datetime,
time,
timedelta,
)
from decimal import Decimal
import re
from typing import (
TYPE_CHECKING,
Any,
cast,
)
import warnings
import numpy as np
import pytz
from pandas._libs import (
... |
98fa19501c917a319e5a7cbf95e7a7e431cbf447852cf5be5c60cfc4707cf299 | Python | 76,105 | 2,019 | import numpy as np
import scipy
from scipy.io import loadmat
import os
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import matplotlib.patches as mpatches
from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable
#from mpl_toolkits.axes_grid1.colorbar import colorbar
import yaml
from... |
8f6aa6e9fb097d3f33d01d5a7ada3d41b6d8e0b452037eb5e7cb5593ed37dd06 | Python | 77,136 | 2,157 | from datetime import timedelta
from decimal import Decimal
import re
from dateutil.tz import tzlocal
import numpy as np
import pytest
from pandas._config import using_pyarrow_string_dtype
from pandas.compat import (
IS64,
is_platform_windows,
)
from pandas.compat.numpy import np_version_gt2
import pandas.uti... |
8807bad01f343fb17fdf5c7cb2701025024cd97dd55de64e0569fe52f9c87ed9 | Python | 77,207 | 1,700 | import numpy as np
import sys, os, math
import datetime as dt
import scipy, scipy.signal
import parmap
from scipy.interpolate import splrep, splev, make_interp_spline, splder, sproot, interp1d
from tqdm import tqdm
# doing imports inside module until travis is fixed
# Cat: TODO: move these to the top once Peter's work... |
944a58c2dd8b6743161f78c69628b02e47a8a928b488d23e292128008c07f5c8 | Python | 77,402 | 1,963 | import sys
import operator
import pytest
import ctypes
import gc
import types
from typing import Any
import pickle
import numpy as np
import numpy.dtypes
from numpy._core._rational_tests import rational
from numpy._core._multiarray_tests import create_custom_field_dtype
from numpy.testing import (
assert_, assert_... |
978b425ccf1ef5a3c2d810fab2322bd1d793f89fb3e6d1e00b02fea757d2d0f1 | Python | 77,602 | 602 | # Automatically generated by scripts/gen_mapfiles.py.
# DO NOT EDIT BY HAND; run `tox -e mapfiles` instead.
LEXERS = {
'ABAPLexer': ('pip._vendor.pygments.lexers.business', 'ABAP', ('abap',), ('*.abap', '*.ABAP'), ('text/x-abap',)),
'AMDGPULexer': ('pip._vendor.pygments.lexers.amdgpu', 'AMDGPU', ('amdgpu',), (... |
69f4dba3f10126988c8736e0230b91698fc61171a84a5baccca1a5636e58e62b | Python | 77,780 | 1,772 | """Module to plot different metrics generated by arcos4py functions.
Examples:
>>> # Data Plots
>>> from arcos4py.plotting import dataPlots
>>> data_plots = dataPlots(df,'time', 'meas', 'track_id')
>>> hist = data_plots.histogram()
>>> dens = data_plots.density_plot()
>>> xt_plot = data_plots.p... |
ea42dc7d26cf65fb052851564f50b8267d1f225348039df721599724bcd2d160 | Python | 78,109 | 2,127 | """
Created on Jun 5, 2024
Derived from Brandon Westover's lab. Don't know the original author.
Part of codes are derived from mne-python which are licensed under BSD
3-Clause "New" or "Revised" License
TODO: clean up codes
Remove get1020Md dependency and op1020
@author: mning
"""
import copy
import logging
impo... |
5b7d067081afb4e598c008d98f8663ba8b94bad0ba7df80dbb28c9cbb7d9fa5a | Python | 78,306 | 4,243 | # This file is automatically generated by tools/idna-data
__version__ = "15.1.0"
scripts = {
"Greek": (
0x37000000374,
0x37500000378,
0x37A0000037E,
0x37F00000380,
0x38400000385,
0x38600000387,
0x3880000038B,
0x38C0000038D,
0x38E000003A2,
... |
87465cd2ee1d5e5437134a800cd6251fb885e175f72b603a1e263986c791c12b | Python | 78,314 | 1,960 | # pylint: disable-msg=W0611, W0612, W0511
"""Tests suite for MaskedArray.
Adapted from the original test_ma by Pierre Gerard-Marchant
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: test_extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
import warnings
import itertools
import p... |
265067f435735ef1db0ca3d87f217a76df278da34e790ea6911def74915433f2 | Python | 78,323 | 2,202 | import datetime
from datetime import timedelta
from decimal import Decimal
from io import (
BytesIO,
StringIO,
)
import json
import os
import sys
import time
import numpy as np
import pytest
from pandas._config import using_pyarrow_string_dtype
from pandas.compat import IS64
import pandas.util._test_decorato... |
4e4128befac1a977efb3725749ed7cd26f44007a67410847752d78bd2cf1d310 | Python | 78,579 | 1,848 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 8 07:48:48 2022
@author: phykc
"""
import rgbcelltracker2 as rgb
import numpy as np
from math import cos, sin, pi
import cv2 as cv2
import os
import pandas as pd
import csv
import datetime
import matplotlib.pyplot as plt
from scipy.interpolate impo... |
387d1d0f828dad511ff05942ef931eced860103a2103c772937bb1c28b85f0b3 | Python | 78,911 | 2,179 | # Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
from datetime import (
datetime,
timedelta,
)
import numpy as np
import pytest
from pandas.errors import (
OutOfBoundsDatetime,
PerformanceWarning,
)
import pandas as pd
from pandas import (
DataFrame,
... |
9d8d0421ef4a5a3cbe7e50daecc95ee3f4069e7c1062a798d8e561047b93725d | Python | 79,554 | 2,507 | """Comprehensive tests for cali.sqlmodel module.
Tests cover:
- Database schema creation and integrity
- Model relationships and constraints
- JSON to database migration
- Database to useq.WellPlate/WellPlatePlan conversion
- Helper functions and utilities
- Edge cases and error handling
Note: For creating experiment... |
25691240ae6dc38f3c4484583f77d81bf704c706bee49c1fc42405798a329b11 | Python | 80,533 | 2,055 | """SQLModel schema for calcium imaging analysis data.
This module defines the database schema for storing calcium imaging analysis results
using SQLModel. The schema supports hierarchical data organization:
Experiment → Plate → Well → FOV (Field of View) → ROI (Region of Interest)
The schema enables:
- Efficient quer... |
e0c0c0d94600af7f9de084de698f03a1f9bdb03a498208771d44dd2000f25ac1 | Python | 80,576 | 2,552 | # pylint: disable=invalid-name
import os
import sys
from functools import partial
import numpy as np
import opt_einsum as oem
import tensornetwork as tn
import pytest
from pytest_lazyfixture import lazy_fixture as lf
# see https://stackoverflow.com/questions/56307329/how-can-i-parametrize-tests-to-run-with-different... |
b680e0a168699ce262c32b6ac91fd7e40989926a9eb58bc1aba29b311f53ebe5 | Python | 81,576 | 2,375 | from __future__ import annotations
from collections.abc import (
Hashable,
Sequence,
)
import itertools
from typing import (
TYPE_CHECKING,
Callable,
Literal,
cast,
)
import warnings
import numpy as np
from pandas._config import (
using_copy_on_write,
warn_copy_on_write,
)
from panda... |
bec88470c8a0e101f031ff473f999aa8e845b1b96a19b87c02d138717d3c0fbc | Python | 81,726 | 2,713 | import functools
import itertools
import operator
import sys
import warnings
import numbers
import builtins
import math
import numpy as np
from . import multiarray
from . import numerictypes as nt
from .multiarray import (
ALLOW_THREADS, BUFSIZE, CLIP, MAXDIMS, MAY_SHARE_BOUNDS, MAY_SHARE_EXACT,
RAISE, WRAP, a... |
634aa905223bc74f3cf1174f3a4ce7be24095036139a57063eadc27fba373e3d | Python | 81,776 | 1,842 | """
app/routers/hypothesis_routes.py
Full EvoAge hypothesis pipeline:
search -> LLM entity filter -> signed triples -> RESCAL score -> collapse signs
-> sign-aware KG check -> 6 buckets -> evidence -> 4-agent swarm -> judge
STATE DISCIPLINE (the thing that makes this different from the notebook):
* LOADE... |
a5e733155ed36530f6aec0250781d92fdcf81dc6694b13e623b168ee901940a9 | Python | 82,695 | 2,073 | """
Backend-aware matrix-function actions, Ritz eigenpairs, and spectral measures.
The public routines in this module operate on dense, sparse, ``LinearOperator``
and matrix-vector-product inputs. Solver sizes are Python values so that the
recurrences have fixed shapes under JIT; query values remain backend tensors.
... |
b5d291ec0d02a43c5a8e37f4db37c006e5eafa3a6ca9228c1360c3b3a34564b6 | Python | 82,746 | 1,705 | #!/usr/bin/env python
# coding: utf-8
# # Welcome to the AIMS CLI
# # Section 0: Loading in Modules and Defining Figure Formatting
# This first cell is just loading in all of the necessary python modules (which you should have already installed) and defining figure font, size, etc.
# In[1]:
import numpy as np
from ma... |
d74366b1caebfc6a6558f6bdb7b9c096e8b14d2ef702a25f08d6e25f829fe472 | Python | 83,181 | 2,293 | """
Tests for the file pandas.io.formats.format, *not* tests for general formatting
of pandas objects.
"""
from datetime import datetime
from io import StringIO
from pathlib import Path
import re
from shutil import get_terminal_size
import numpy as np
import pytest
from pandas._config import using_pyarrow_string_dtyp... |
0e166214aa8eed2561b4dc11a9ee636e170009baadb488897ebb98e6b6cb8fe4 | Python | 83,315 | 2,386 | """ Test functions for linalg module
"""
import os
import sys
import itertools
import threading
import traceback
import textwrap
import subprocess
import pytest
import numpy as np
from numpy import array, single, double, csingle, cdouble, dot, identity, matmul
from numpy._core import swapaxes
from numpy.exceptions im... |
991cd34a39375d260d4f98689eaf8dd0c4137dba95b5d0bcc7a9767a9b4c4017 | Python | 84,888 | 2,228 | import streamlit as st
import base64
# ==========================================================
# CSS SETTINGS
# ==========================================================
def css_setting():
# Load background image
try:
with open("assets/bg6.png", "rb") as bg_file:
imag... |
bc441a3429132a48239ae17197349cb8ba4c2452c26ec7031ab440d1fed63059 | Python | 85,047 | 2,588 | """
An interface for extending pandas with custom arrays.
.. warning::
This is an experimental API and subject to breaking changes
without warning.
"""
from __future__ import annotations
import operator
from typing import (
TYPE_CHECKING,
Any,
Callable,
ClassVar,
Literal,
cast,
over... |
0a9fa8a7691fa2967cc2af92050d76321e51434a7c99c0501d84a1d21f837a05 | Python | 85,275 | 2,124 | import hashlib
import pickle
import sys
import warnings
import numpy as np
import pytest
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_warns,
assert_no_warnings, assert_array_equal, assert_array_almost_equal,
suppress_warnings, IS_WASM
)
from numpy.random imp... |
b8ad2121731f946b9e7e642e03c73a970c13ecda74b955d15a1c4f89ec6d81be | Python | 85,344 | 2,290 | """
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://setuptools.readthedocs.io/en/latest/deprecated/easy_install.html
"""
from glo... |
5126d4f40413fc8a645b5fb74e4cc1d475f440e6225754c601c2c047658760c9 | Python | 86,296 | 1,917 | import numpy as np
import pandas
import matplotlib.pyplot as pl
import math
import matplotlib as mpl
from matplotlib import cm
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.metrics import accuracy_score
import aims_loader as aimsLoad
# Define some initial stuff and import analysis f... |
c8fe3104076b79a7299a629a9a1ef0e8ee024e5d0d439cf45154ae03b2d2b347 | Python | 87,157 | 2,383 | """
Module contains tools for processing files into DataFrames or other objects
GH#48849 provides a convenient way of deprecating keyword arguments
"""
from __future__ import annotations
from collections import (
abc,
defaultdict,
)
import csv
import sys
from textwrap import fill
from typing import (
IO,
... |
a17511a23213b8c98e43665c389fc82a49b96a1ca84f9b6703cf6367bd024ddb | Python | 87,973 | 2,354 | """
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://setuptools.pypa.io/en/latest/deprecated/easy_install.html
"""
from glob impor... |
a6ef808a4361a5b987986beae6e85c1c07517a0bdcd23ad8e4ef0923533fc63f | Python | 89,239 | 2,484 | import os
import re
import sys
import copy
import glob
import atexit
import tempfile
import subprocess
import shutil
import multiprocessing
import textwrap
import importlib.util
from threading import local as tlocal
from functools import reduce
import distutils
from distutils.errors import DistutilsError
# stores tem... |
d2ddeb0df6819af8fca92c957f17350c33dd9e1014ee6e0745a26c9af4d3614c | Python | 89,288 | 2,556 | from __future__ import annotations
from datetime import (
datetime,
timedelta,
)
from functools import wraps
import operator
from typing import (
TYPE_CHECKING,
Any,
Callable,
Literal,
Union,
cast,
final,
overload,
)
import warnings
import numpy as np
from pandas._libs import ... |
9c2007736e2e967a8123d21498a1475fba8804e29d885694c32ef6d6f40e4427 | Python | 89,319 | 2,100 | """Unified runner interface for detection and analysis."""
from __future__ import annotations
from datetime import datetime
from pathlib import Path
from typing import TYPE_CHECKING, Any, cast
from sqlalchemy import event
from sqlmodel import Session, create_engine, select
from cali._constants import DEFAULT_CALI_D... |
7fded5f743eb459ac567f22b0717c4b600d7bd823f246a8cb0897fffd6f4cbd1 | Python | 90,255 | 2,469 | # Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for datetime64 and datetime64tz dtypes
from datetime import (
datetime,
time,
timedelta,
)
from itertools import (
product,
starmap,
)
import operator
import numpy as np
import pytest
import... |
4e0c972b8d00e1da7c81e28878658cc0d9bfbf9f7b8d64262591fe1fe4d249d4 | Python | 90,899 | 2,497 | from __future__ import annotations
from collections import defaultdict
from collections.abc import Sequence
from functools import partial
import re
from typing import (
TYPE_CHECKING,
Any,
Callable,
DefaultDict,
Optional,
TypedDict,
Union,
)
from uuid import uuid4
import numpy as np
from ... |
64caa6526ad5cf5261e4f17af874aa1d0b61d53ef3ead662158a051388eb1c95 | Python | 92,292 | 2,381 | import bz2
import datetime as dt
from datetime import datetime
import gzip
import io
import os
import struct
import tarfile
import zipfile
import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import CategoricalDtype
import pandas._testing as tm
from pandas.core.f... |
0ea387106914935f282107438fc0a205b13f5c65964d0784eeea8cc57ed2d955 | Python | 92,345 | 2,820 | from __future__ import annotations
from datetime import (
datetime,
timedelta,
tzinfo,
)
from typing import (
TYPE_CHECKING,
cast,
overload,
)
import warnings
import numpy as np
from pandas._libs import (
lib,
tslib,
)
from pandas._libs.tslibs import (
BaseOffset,
NaT,
NaT... |
f4cdb2dc9f3b551d2a510108509ee7577a1a16fff7d13026f42fe434c8d91314 | Python | 92,451 | 2,608 | """
Backend magic inherited from tensornetwork: abstract backend
"""
# pylint: disable=invalid-name
from collections import OrderedDict, defaultdict
from functools import reduce, partial
from operator import mul
from typing import Any, Callable, Iterator, List, Optional, Sequence, Tuple, Union
import math
import num... |
e764c9de0b49e0aefd438fe4734182080283dd20f48fd9e2c9b5a8c6623c67f5 | Python | 93,311 | 2,714 | from datetime import (
date,
datetime,
timedelta,
)
from itertools import product
import re
import numpy as np
import pytest
from pandas._config import using_pyarrow_string_dtype
from pandas.errors import PerformanceWarning
import pandas as pd
from pandas import (
Categorical,
DataFrame,
Gro... |
a38170be77453181cfa984202ae123808a688b3677bef43edc722e1ea8910fa8 | Python | 95,395 | 2,663 | import copy
import sys
import gc
import tempfile
import pytest
from os import path
from io import BytesIO
from itertools import chain
import pickle
import numpy as np
from numpy.exceptions import AxisError, ComplexWarning
from numpy.testing import (
assert_, assert_equal, IS_PYPY, assert_almost_equal,
... |
8e3e4d982576f0d82c59731a055a95fa3f3e24fc19382bb785e2e2f4001b4cc5 | Python | 95,504 | 2,930 | """
Provide a generic structure to support window functions,
similar to how we have a Groupby object.
"""
from __future__ import annotations
import copy
from datetime import timedelta
from functools import partial
import inspect
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Callable,... |
95c9089c24facf8dc4b8af1c7f44289e8dd6fcb789d94a80a3131358cc67bed4 | Python | 95,578 | 2,920 | from __future__ import annotations
import copy
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Callable,
Literal,
cast,
final,
no_type_check,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._libs.tslibs import (
BaseOffset,
IncompatibleFre... |
52b5a931fb20403e782b8eae8f4d1d015c753db97c2450abd3fc9bee6d6e6644 | Python | 95,700 | 2,760 | """
Utility function to facilitate testing.
"""
import os
import sys
import pathlib
import platform
import re
import gc
import operator
import warnings
from functools import partial, wraps
import shutil
import contextlib
from tempfile import mkdtemp, mkstemp
from unittest.case import SkipTest
from warnings import Warn... |
2c2b2b0888ee85c133fb2c378329399d828d88c17587c7a7ea740ed61853cb01 | Python | 96,885 | 2,852 | """
Define the SeriesGroupBy and DataFrameGroupBy
classes that hold the groupby interfaces (and some implementations).
These are user facing as the result of the ``df.groupby(...)`` operations,
which here returns a DataFrameGroupBy object.
"""
from __future__ import annotations
from collections import abc
from functo... |
4d1adbb41794ac42e2b85882a4056e3f4c88b1faf154bbc16d3f5b3ef9420266 | Python | 97,236 | 2,785 | from __future__ import annotations
from contextlib import suppress
import sys
from typing import (
TYPE_CHECKING,
Any,
TypeVar,
cast,
final,
)
import warnings
import numpy as np
from pandas._config import (
using_copy_on_write,
warn_copy_on_write,
)
from pandas._libs.indexing import NDFr... |
a119d314b5aaf499de04f47cbce125526560015135db4afbd45d527f97e12a12 | Python | 97,375 | 2,678 | from datetime import datetime
import itertools
import re
import numpy as np
import pytest
from pandas._libs import lib
from pandas.errors import PerformanceWarning
import pandas as pd
from pandas import (
DataFrame,
Index,
MultiIndex,
Period,
Series,
Timedelta,
date_range,
)
import pandas... |
ab562ab61eca9027659b75010120efcd57e6f9f40c4fd24f0e9d483440893380 | Python | 98,409 | 2,599 | """ Test cases for DataFrame.plot """
from datetime import (
date,
datetime,
)
import gc
import itertools
import re
import string
import weakref
import numpy as np
import pytest
import pandas.util._test_decorators as td
from pandas.core.dtypes.api import is_list_like
import pandas as pd
from pandas import (... |
5bb2188a704537c296e51b74a3b049be6720a604ad41e2d4ab73f1a5512cad8f | Python | 98,485 | 2,850 | from __future__ import annotations
from functools import wraps
import inspect
import re
from typing import (
TYPE_CHECKING,
Any,
Callable,
Literal,
cast,
final,
)
import warnings
import weakref
import numpy as np
from pandas._config import (
get_option,
using_copy_on_write,
warn_c... |
2b226a359853fdff19ba13bf9196342d7522f888d51893fc72bdeff5a72fb598 | Python | 98,877 | 2,207 | import numpy as np
import pandas
import matplotlib.pyplot as pl
import math
import matplotlib as mpl
from matplotlib import cm
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.metrics import accuracy_score
from sklearn.utils import resample
from aims_immune import aims_loader as aimsLoa... |
7262c16924a3cca6803406cc8bae04ba4f8bc6fbba9fe3d9d332c7fafc6b4b6a | Python | 98,997 | 3,070 | from __future__ import annotations
from csv import QUOTE_NONNUMERIC
from functools import partial
import operator
from shutil import get_terminal_size
from typing import (
TYPE_CHECKING,
Literal,
cast,
overload,
)
import warnings
import numpy as np
from pandas._config import get_option
from pandas._... |
500f386e9385f717c42c1b1a8004a31dfd44e4680b5afb3f63f1a6b69964a2fc | Python | 99,377 | 2,595 | """
IO related functions.
"""
import os
import re
import functools
import itertools
import warnings
import weakref
import contextlib
import operator
from operator import itemgetter
from collections.abc import Mapping
import pickle
import numpy as np
from . import format
from ._datasource import DataSource
from numpy._... |
2b7d736ab73adc8d5c125ef84d23cf213acb7697155409693ac94fd9d4cb614a | Python | 99,585 | 2,762 | """
SQL-style merge routines
"""
from __future__ import annotations
from collections.abc import (
Hashable,
Sequence,
)
import datetime
from functools import partial
from typing import (
TYPE_CHECKING,
Literal,
cast,
final,
)
import uuid
import warnings
import numpy as np
from pandas._libs im... |
faad4770ef67377fa6de6758792c94d5012fd87803f980e91592c4056cce1d30 | Python | 100,396 | 2,668 | """Provides the `CCompilerOpt` class, used for handling the CPU/hardware
optimization, starting from parsing the command arguments, to managing the
relation between the CPU baseline and dispatch-able features,
also generating the required C headers and ending with compiling
the sources with proper compiler's flags.
`C... |
b7d6b366999131553972985505949284db26071776f880167134e5868afe135b | Python | 100,849 | 2,680 | import inspect
import os
import sys
import threading
import zlib
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from datetime import datetime
from functools import wraps
from getpass import getpass
from html import escape
from inspect import isclass
from itertools import islice
from math i... |
01ece5cc6c3be947a31d56e5bb5c7db46a5ec7a6e64a0dbf42ebaf0559d27f48 | Python | 101,704 | 2,926 | """
Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.
"""
from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
from contextlib import (
ExitStack,
contextmanager,
)
from datetime import (
date,
date... |
7e86769206fda18c7fb71d8f86b78cfdcdd31f14f2fdfe9976928f09e8d4f771 | Python | 102,796 | 2,942 | from __future__ import annotations
import functools
import operator
import re
import textwrap
from typing import (
TYPE_CHECKING,
Any,
Callable,
Literal,
cast,
)
import unicodedata
import numpy as np
from pandas._libs import lib
from pandas._libs.tslibs import (
NaT,
Timedelta,
Timest... |
eca2bbdba57e80083276fc75a852422c685a3a059885ecd6298c228d6caf6c36 | Python | 103,404 | 2,672 | from unittest.mock import patch
import logging
import matplotlib
matplotlib.use("Agg")
import pytest
import numpy as np
from pytest_lazyfixture import lazy_fixture as lf
from tensorcircuit.templates.lattice import (
ChainLattice,
CheckerboardLattice,
CubicLattice,
CustomizeLattice,
DimerizedChai... |
44c128bf20e36f9f492ac0a0d696cf24d18b369a76625acff517773e8abce328 | Python | 104,268 | 2,940 | ## ...........................................................................
##
## PIMMS (Polymer Interactions in Multicomponent Mixtures)
## Alex Holehouse, Pappu Lab, Holehouse Lab
## Copyright 2015 - 2026
## ...........................................................................
##
## lattice_utils
##
## la... |
3bed1ff67d28b1bbba9d8af2386d86d433691a2b99dd7cb83373db237542a5e7 | Python | 105,490 | 2,000 | ## ...........................................................................
##
## PIMMS (Polymer Interactions in Multicomponent Mixtures)
## Alex Holehouse, Pappu Lab, Holehouse Lab
## Copyright 2015 - 2026
## ...........................................................................
##
## keyfile_parser
##
## Th... |
9f58c74fd8a6354db59c67fb2dc59e6e0d0817f612a43c58f21baff76c94398e | Python | 105,663 | 2,709 | import os
import logging
import numpy as np
import parmap
from sklearn import mixture
import scipy
from scipy.interpolate import interp1d
import datetime as dt
from tqdm import tqdm
import torch
import torch.multiprocessing as mp
from yass import read_config
from yass.reader import READER
from yass.deconvolve.match_p... |
d91fbae762b3da26a6cd9893ea8fa482c807114360f62fe24260bba796487525 | Python | 106,202 | 3,020 | from datetime import (
date,
datetime,
timedelta,
)
import re
import numpy as np
import pytest
from pandas.core.dtypes.common import (
is_object_dtype,
is_string_dtype,
)
from pandas.core.dtypes.dtypes import CategoricalDtype
import pandas as pd
from pandas import (
Categorical,
Categoric... |
4a436f621c1cace55eb2c3cdcdd001ad39f644a3f885a59458cdbe5a65d36cc8 | Python | 106,601 | 2,423 | """Module to track and detect collective events.
Example:
>>> from arcos4py.tools import track_events_image
>>> ts = track_events_image(data)
>>> from arcos4py.tools import track_events_dataframe
>>> ts = track_events_dataframe(data)
"""
from __future__ import annotations
import functools
import war... |
6ed9d44979a4dcb299279581bda59ef32940d85c9a2db7359dad97e92dc34ed5 | Python | 108,274 | 3,346 | from datetime import datetime
import decimal
from decimal import Decimal
import re
import numpy as np
import pytest
from pandas.errors import (
PerformanceWarning,
SpecificationError,
)
import pandas.util._test_decorators as td
from pandas.core.dtypes.common import is_string_dtype
import pandas as pd
from p... |
b809cfabc16c4d71c01071562bb514f4085d363138a394a47e4f02c9f6f3b4ef | Python | 108,573 | 3,303 | """
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipul... |
d5bac6d036a725d4212baf3427ecd1e1894173ea037effd051890839bf283f34 | Python | 110,047 | 2,821 | import sys
import gc
import gzip
import os
import threading
import time
import warnings
import re
import pytest
from pathlib import Path
from tempfile import NamedTemporaryFile
from io import BytesIO, StringIO
from datetime import datetime
import locale
from multiprocessing import Value, get_context
from ctypes import ... |
3027fc36846a5a973c11c5e40fd54db7efe79f6f567bc66eb8cd580e34af50b1 | Python | 112,072 | 3,564 | #!/usr/bin/env python
"""
pyemf is a pure python module that provides a cross-platform ability
to generate enhanced metafiles (.emf files), a vector graphics format
defined by the ECMA-234 standard. Enhanced metafiles are a natively
supported image and scalable clip-art format in the OpenOffice suite
of tools and in... |
4a5ad2648532c4cf8c46f42fd402b4067718fef7ab4b4e481c1a4ae49c9372e3 | Python | 112,261 | 2,933 | """Core correctness regressions for ``tensorcircuit.tnalg``."""
import importlib
import numpy as np
import pytest
import scipy.linalg
pytest.importorskip("jax")
import jax
import jax.numpy as jnp
import jax.scipy.linalg as jsp_linalg
from jax.scipy.linalg import expm
import tensorcircuit as tc
import tensorcircuit... |
fc801d1a8fd9063ce7929bea4ad519db1c98c82b82a18b737bd4ebc5bf067792 | Python | 112,575 | 3,543 | from __future__ import annotations
import codecs
from functools import wraps
import re
from typing import (
TYPE_CHECKING,
Callable,
Literal,
cast,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._typing import (
AlignJoin,
DtypeObj,
F,
Scalar,
npt,
)... |
916c0d6ab1c23fe0f9422daaffc5a2512b3f20b3a8dbbd05a4558e9ff2630adc | Python | 113,904 | 3,267 | """
This file defines a set of system_info classes for getting
information about various resources (libraries, library directories,
include directories, etc.) in the system. Usage:
info_dict = get_info(<name>)
where <name> is a string 'atlas','x11','fftw','lapack','blas',
'lapack_src', 'blas_src', etc. For a co... |
40d795507d435d07bb5f9620a7e2d5f56d6d37bb1bc1b84c5c841b44d3d8257d | Python | 114,680 | 3,629 | """Lite version of scipy.linalg.
Notes
-----
This module is a lite version of the linalg.py module in SciPy which
contains high-level Python interface to the LAPACK library. The lite
version only accesses the following LAPACK functions: dgesv, zgesv,
dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr... |
4359c455d72d670bc83ce96de2f7c7928d136271c2784e3450412e97c5a9cafb | Python | 114,748 | 3,047 | import enum
import errno
import inspect
import os
import sys
import typing as t
from collections import abc
from contextlib import contextmanager
from contextlib import ExitStack
from functools import update_wrapper
from gettext import gettext as _
from gettext import ngettext
from itertools import repeat
from types im... |
16297729e24a5b19b2f7f61bed3930979ba22bedc4c1a4a7a6d7e9c297c27e6f | Python | 116,199 | 3,388 | """
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.