sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
d180b51a0f6799307513e39dcdeb7c231be694249e4ab24eb1301cf3b54c4980 | Python | 47,640 | 1,240 | # 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... |
7795b4d2c15f488fde033d8dc8b7a65958260482179f0bc035bdce70bb6ecc5e | Python | 47,671 | 1,607 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 23 19:06:01 2021
@author: jeanbaptiste
"""
import os
import threading
import time
import warnings
import gc
import cv2
import numpy as np
import delta
import tensorflow as tf
import matplotlib.pyplot as plt
class AbstractImageProcessor(threading.Thread):
'''
Abs... |
e9dbf8f4815bf2eca72d7d70258a863dbe13c2f47561069135710182021bb559 | Python | 47,682 | 1,386 | import numpy as np
import pytest
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
from pandas.api.indexers import BaseIndexer
from pandas.core.groupby.groupby import get_groupby
@pytest.fixture
def times_frame():
"""Frame for testing times argument in EWM groupby."""
... |
cb0e0a9b8d659811bb702d8e8f09a0bf8dcba98febe5252b1721d9936e5e0ba0 | Python | 47,732 | 899 | # License: see [LICENSE, LICENSES/legged_gym/LICENSE]
from legged_gym import LEGGED_GYM_ROOT_DIR, envs
from time import time
from warnings import WarningMessage
import numpy as np
import os
from isaacgym.torch_utils import *
from isaacgym import gymtorch, gymapi, gymutil
import torch
from torch import Tensor
from ty... |
aa4d69099bab0e41606d72d01629de436a39df410f01384aba1319dd0134241a | Python | 47,785 | 1,329 | import numpy as np
import scipy as sp
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components
import os
import glob
from matplotlib.collections import LineCollection
from mpl_toolkits.mplot3d.art3d import Line3DCollection
try:
from vtk import vtkContourFilter, vtkVersion, vtkPolyDa... |
3c9ab1adf8ebe65c833228a1015d8b5379769478ef0202f28c2b3c72d79900bb | Python | 47,794 | 1,377 | # 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... |
43077fc1bb650852c317391915cb478569412bcb41f227978daa3c0fdd35a173 | Python | 47,926 | 1,273 | """`SupervisedExperiment` — base for classification / regression / time-series.
Adds the supervised-learning verb set on top of `Experiment`:
`compare_models`, `tune_model`, `ensemble_model`, `blend_models`,
`stack_models`, `calibrate_model`, `finalize_model`, `interpret_model`,
`automl`, `get_leaderboard`.
Every ver... |
7243607a4990c4ba69af2341dbffaabf17f5dece7e5e495c766533fa7d5c7144 | Python | 47,931 | 1,588 | from datetime import (
date,
datetime,
time,
)
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
from pandas.tests.groupby import get_groupby_method_args
def test_apply_func_that_appends_group_to_list_without_copy():
# GH: 177... |
bcbdaf891c3b34cb3f25784f5a70c794319ff9efd1053bc4ff2a45665525a9fd | Python | 47,932 | 1,010 | # 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... |
b0cbd65a900d6579d8d3e0a17c58ae031dd66e9b9bb1cb8a9ea8856067922d74 | Python | 47,993 | 1,303 | """
test where we are determining what we are grouping, or getting groups
"""
from datetime import (
date,
timedelta,
)
import numpy as np
import pytest
from pandas.errors import (
Pandas4Warning,
SpecificationError,
)
import pandas as pd
import pandas._testing as tm
from pandas.core.groupby.grouper... |
cc002ed6bf2765a9860888512de9030cf45d7a3032b221c033abb3990639e5e8 | Python | 48,055 | 1,275 | import datetime
import re
import numpy as np
import pytest
from pandas._config import using_string_dtype
from pandas._libs.tslibs import Timestamp
from pandas.compat import is_platform_windows
import pandas as pd
import pandas._testing as tm
from pandas.util import _test_decorators as td
pytestmark = [pytest.mark.... |
a1d6efe64a435cbee4ef5c84bfff0f1cfe4dcb5cac1d7c9aee33cb6da8925354 | Python | 48,219 | 1,303 | # 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... |
a2242a607b58c64d16367e28c0abe2f6ae5e173ab83fe83353729afd9091393e | Python | 48,411 | 1,214 | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 21 19:42:53 2023
Convolutional Spiking Neural Networks for Intent Detection Based on Anticipatory
Brain Potentials Using Electroencephalogram
Authors: Nathan Lutes, V. S. S. Nadendla, K. Krishnamurthy
"""
#this script contains the different KFoldCrossVal functions
def ... |
141b9ff1cda845fadae6a444e543cba0b53463ea9d6be0b5052cfcc4956899cd | Python | 48,419 | 1,277 | # 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... |
4a26a539dde7c4b40bb2c1f0d77aa1a6cf0fd357321607365a20ccb184140e88 | Python | 48,422 | 1,312 | """
test where we are determining what we are grouping, or getting groups
"""
from datetime import (
date,
timedelta,
)
import numpy as np
import pytest
from pandas.errors import (
Pandas4Warning,
SpecificationError,
)
import pandas as pd
import pandas._testing as tm
from pandas.core.groupby.grouper... |
22207ea0794169cdad23a9905dad10c5aa7e010032d5683fe2c919613cb55c03 | Python | 48,464 | 959 | import numpy as np
import sys as sys
import os
def order_pairs(elements):
ordered_pairs=[]
for l in elements:
for k in elements:
if (k >= l):
ordered_pairs.append(l+k)
return ordered_pairs
def flatten_dict(dictionary):
flattened_list = []
for key, value in dictionary.... |
49f96261e4880590770422b51cb758b999b94b9a9c273f63feb2308bfae5b714 | Python | 48,492 | 1,121 | """
Title: figure_shower.py
Author: Matus Tomko
Mail: matus.tomko __at__ fmph.uniba.sk
"""
import efel
import gzip
import multiprocessing
import os
import pickle
import matplotlib.patches as mpatches
import numpy as np
import scipy.stats as stats
import seaborn as sns
from matplotlib import pyplot as plt
from sklearn... |
6c4f1d0af55d2f9e1b131af7a8608c183bb5ec0fe026db3f9781cab40f72154b | Python | 48,565 | 1,438 | from __future__ import annotations
from datetime import (
date,
datetime,
time,
timedelta,
)
from decimal import Decimal
import locale
import numpy as np
import pytest
from pandas._libs.tslibs import timezones
from pandas.errors import (
OutOfBoundsDatetime,
OutOfBoundsTimedelta,
Pandas4W... |
82a0bb37a628890f43d94aabf65573354f06e19fd3992a053f34588a68e385f5 | Python | 48,571 | 1,063 | import json
import sys
from pathlib import Path
from unittest.mock import MagicMock, patch
import numpy as np
import pandas as pd
import pytest
import torch
from lightning_pose.api import Model
from tests.api.model_helpers import _setup_test_model
def _confident_keypoint_deviations(
preds_a: pd.DataFrame,
p... |
891f4208689694a30faa0c96757f9e5a080c74dc19b9141e9915d4cb03e3807e | Python | 48,636 | 1,441 | # cython: language_level=3
# Time-stamp: <2025-04-11 13:26:28 Tao Liu>
"""Module Description:
New pileup algorithm based on p-v array idea. It's modified from
original algorithm in MACS2 proposed by Jie Wang. Now we allow
different weights for different genomic ranges, and simplify the
approach. The basic idea is to ... |
45d29596af6bdc382af5dcd980cc558672067737ac0c6e7249862c61da2bab02 | Python | 48,662 | 1,605 | from datetime import (
date,
datetime,
time,
)
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
from pandas.tests.groupby import get_groupby_method_args
def test_apply_func_that_appends_group_to_list_without_copy():
# GH: 177... |
e47605fe1db9ea89ccb36cd245c5c63af657eb0d5e4cedcbfee08159ddc02d35 | Python | 48,685 | 1,273 | """Chromosight's detection submodule implements the bulk of chromosight
convolution engine, as well as functions to perform the different steps of the
detection algorithm (pre-processing, local maxima, post-processing...). The
pattern_detector function orchestrate all those different steps."""
from __future__ import a... |
cd444d40afd5e15c1d129296072cb5ddc7eecc8a1257e570631737c19eebe4e0 | Python | 48,712 | 1,215 | import copy
import json
import os
import random
import re
import subprocess
import sys
import time
from copy import deepcopy
from typing import Callable, Dict, Literal, Optional
import cloudpickle as pickle
from pcntoolkit.dataio.fileio import create_incremental_backup
from pcntoolkit.dataio.norm_data import NormData... |
28730d4e1a1017516466c5c9e058c73f62705512bdd9100ec448fcf30ea22cf1 | Python | 48,716 | 1,244 | # 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... |
05451033daa1a3fec3155667894e220715d490632c591509b12ceb34a068cec3 | Python | 48,897 | 1,194 | 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,
OutOfBoundsDatetime,
P... |
d56376c6c8568b049973f4806d47ed8c75b00cee3a43f824e79cd734239cb224 | Python | 48,947 | 995 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Step S3 (CheckM branch): Within-group bin comparison and selection.
This module is analogous to S3 for the CheckM-based pipeline, using
coverage and PE connection information produced by CheckM-specific
bin abundance routines.
"""
from tempfile import TemporaryFile
f... |
c7455de65fd37e328ed2fe6f4a3a24f6e4453ef63f3506b04ab77f94b5634f66 | Python | 48,987 | 792 | # 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... |
82d12ce7408e474347532193a119c131aa8a5d4533164f64cea8edbb9aa6cb7a | Python | 49,186 | 1,475 | """
Provide classes to perform the groupby aggregate operations.
These are not exposed to the user and provide implementations of the grouping
operations, primarily in cython. These classes (BaseGrouper and BinGrouper)
are contained *in* the SeriesGroupBy and DataFrameGroupBy objects.
"""
from __future__ import annot... |
f03080dd88a7eea0867a7ea488f78145d677b84ca63da0d558b822e4514ef7c5 | Python | 49,236 | 1,419 | """Integration tests for the GUIs."""
# ------------------------------------------------------------------------------
# Imports
# ------------------------------------------------------------------------------
import json
import logging
import os
import shutil
import tempfile
import unittest
from itertools import cyc... |
5fbc8c25f1c014562e4f06ef9cbc392bc135a34621c6fc31e5e20b5db0faaf41 | Python | 49,247 | 1,316 | from datetime import (
datetime,
timedelta,
)
import inspect
import numpy as np
import pytest
from pandas._libs.tslibs.timezones import dateutil_gettz as gettz
from pandas.compat import IS64
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
from pandas.api.types import... |
d34fc84a1fb76e7cdf3b81ddab966a20ec7d1b147aa987b7eca667c43db5b232 | Python | 49,276 | 1,436 | """Common I/O API utilities"""
from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
import codecs
from collections import defaultdict
from collections.abc import (
Hashable,
Mapping,
Sequence,
)
import dataclasses
import functools
import gzip
from io import (
BufferedIOB... |
cbb1bb837f8b18f341a233496bd2f32f575a36452f157827e648f00de57c33e4 | Python | 49,322 | 1,331 | ''' This program will use JSON data to update neuronbridge.publishedURL and create
an order file to upload imagery to AWS S3.
'''
__version__ = '2.2.3'
import argparse
from copy import deepcopy
from datetime import datetime
import glob
import json
from operator import attrgetter
import os
import re
import socket
i... |
deb1157ec0316291382f4a3a886f01c3d8617d41e4fb6c99e19361da56d7aa6e | Python | 49,597 | 1,296 | # 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... |
4311397fd6c7fe7605ed80ab444723b450876d254244473d0d582da45d08c847 | Python | 49,612 | 1,018 | #!/usr/bin/env python
#
# Script to perform manual correction of spinal cord segmentation, gray matter segmentation, MS and SCI lesion
# segmentation, disc labels, compression labels, ponto-medullary junction (PMJ) label, and centerline.
#
# For full help, please run: python manual_correction.py -h
#
# Example:
# ... |
007c0045493d6ef736456ae003b36ac944ea28b1025a54b2c10a0745988d5eeb | Python | 49,790 | 1,668 | """
Unit tests for the :mod:`pennylane.io.qasm_interpreter` module.
"""
# pylint: disable=consider-using-with,unspecified-encoding
from re import escape
from unittest.mock import MagicMock
import numpy as np
import pytest
import pennylane as qp
from pennylane import (
CH,
CNOT,
CRX,
CRY,
CRZ,
... |
efa27d1c7aa65e45914358616edeee4f1655d2df594c2b8c0a0fc6a92c761c7b | Python | 49,845 | 1,541 | # 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... |
c74e449187874a39a53a9e6efc8d25665e11ac7cd9ba985311c60e281196e2a4 | Python | 49,934 | 1,268 | """`TimeSeriesExperiment` — the PyCaret 4.0 time-series forecasting engine.
Supervised (the target is a time-indexed series). Verb surface mirrors
`SupervisedExperiment` plus time-series-specific additions (`check_stats`,
forecast-horizon handling).
Canonical import:
from pycaret.tasks import TimeSeriesExperimen... |
3bbb3f1e8373e723005e959186701d90298f93bad8c4985bf3beb67a1d0027e1 | Python | 49,949 | 1,057 | #! /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... |
5a9fcafd83618d2db4347d116f52eb81d58cfa2fb08f5f9f7191a0bfd1ac5f88 | Python | 50,089 | 1,339 | # -*- coding: utf-8 -*-
'''
NASTIC_WRANGLER_GUI
PYSIMPLEGUI BASED GUI TO PERFORM META ANALYSIS OF METRICS PRODUCED BY NANOSCALE SPATIOTEMPORAL INDEXING CLUSTERING (NASTIC AND SEGNASTIC) OR 3D DBSCAN (BOOSH)
Design and coding: Tristan Wallis
Additional coding: Alex McCann
Queensland Brain Institute
The University of Qu... |
d299206a708b1c6f8c900cedd5948bcdc99d526113791c8affa9337760624aa2 | Python | 50,134 | 1,467 | """
Visualization of evolutionary couplings (contact maps etc.)
Authors:
Thomas A. Hopf
Anna G. Green (complex_contact_map, enrichment_pymol_script non-legacy version)
"""
from copy import deepcopy
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import m... |
e285ae99c92301809b58b21ddac42393c4571183420848e6e751a6f3e29bc4a5 | Python | 50,231 | 1,274 | # 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... |
032691c1a461abe6858999fd397982db7ada5ee00248b6f23b608cb2470fde6e | Python | 50,322 | 1,397 | # 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... |
7059dc8c8df87ff6eb2e4770680b7a5e89d07aafadc8f310a30b47feea05430f | Python | 50,453 | 1,303 | # time_calculations.py
from initialization.initialization import *
from initialization.config import *
from data_processing.clustering import cluster_purity
import os
import numpy as np
import pandas as pd
from tqdm import tqdm
def cluster_composition_timecourse(df):
df_list = []
for frame in df['frame'].... |
efe961ab729bbc0d5aeb806ca5cd269f71e5d520521a8ebe14582d126ea7aba8 | Python | 50,468 | 1,312 | # 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... |
ce19b327786201939f43d11807fbed6dd623674734af972ef7d34e6a9022f13b | Python | 50,496 | 1,178 | from __future__ import annotations
import csv
import os
import sys
import time
from collections import deque
from concurrent.futures import ThreadPoolExecutor
import shapely
sys.path.append('.')
sys.path.append('..')
sys.path.append('../../')
sys.setrecursionlimit(3000)
from functools import wraps, lru_cache
import ... |
9204d84c9b84662beb7040cf9ca1e4457a4b1b1008e4331b7e12f1f1cae37dfe | Python | 50,508 | 1,316 | # 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... |
3b791f7f8ee71f3a004a1daa4bbc29add453c9f301e6c7db1a0f78c4465054c2 | Python | 50,559 | 1,334 | from __future__ import annotations
from datetime import (
UTC,
datetime,
timedelta,
)
from typing import TYPE_CHECKING
import pytest
from scripts.issue_assignment import (
core,
label_awaiting_review,
messages,
unassign_inactive,
)
if TYPE_CHECKING:
from collections.abc import Iterat... |
4526dbeb479733779387018762bc8bbbfb6e892722d40e02694c6ed8e99bf187 | Python | 50,571 | 1,251 | # 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... |
3d3f2876db61e429f2a6d6a545a7c6953742dd061ea776e12624c0ff80728e97 | Python | 50,613 | 1,423 | from typing import Iterable, List, Literal, Optional, Union
import numpy as np
import pandas as pd
import tqdm
from anndata import AnnData
from mudata import MuData
_Method_rank_peak_groups = Optional[Literal["binomtest", "binomtest2", "fisher_exact"]]
_alternative = Optional[Literal["two-sided", "greater"]]
_alterna... |
531f8f5e742f0fb6de5c12ba662c33cff2e07c2b457df47c81a02773b43a98d8 | Python | 50,844 | 1,485 | from __future__ import annotations
import re
import warnings
import numpy as np
import pytest
from pandas._libs import (
NaT,
Timestamp,
)
from pandas._libs.tslibs import to_offset
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.dtypes import PeriodDtype
import pandas as pd
import pandas._... |
671e0da0ccaaacabae4187d4ff3db6669a9a80c1746632e9f54ff9b3887f1560 | Python | 50,911 | 1,472 | """Common I/O API utilities"""
from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
import codecs
from collections import defaultdict
from collections.abc import (
Hashable,
Mapping,
Sequence,
)
import dataclasses
import functools
import gzip
from io import (
BufferedIOB... |
89a3d2436e9cd5d3cf44a5253cc4a0f26f6c1a3caf5681e49c96aca6006a410c | Python | 51,001 | 1,160 | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 16 18:11:11 2023
@author: lonya
"""
#%% Load Data
import tkinter as tk
import tkinter.filedialog as fd
import numpy as np
import os
import matplotlib.pyplot as plt
import pandas as pd
import my_funcs as mf
import seaborn as sns
from scipy.stats import sem
from scipy.stats... |
9e558ebaac1a1205cb38ebf514028a2db91f08234d1fbeb91e3e5290abe732c3 | Python | 51,046 | 1,312 | #!/usr/bin/env python
# Time-stamp: <2024-10-18 15:30:21 Tao Liu>
import io
import unittest
from numpy.testing import assert_array_equal # assert_equal, assert_almost_equal
import numpy as np
from MACS3.Signal.ScoreTrack import ScoreTrackII, TwoConditionScores
from MACS3.Signal.BedGraph import bedGraphTrackI
import... |
0fc38e1c9ba27fc82b2a76d070decc68b46b38b5cc7fbc1d0aa4a1091bf6d72d | Python | 51,119 | 1,522 | """
Provide classes to perform the groupby aggregate operations.
These are not exposed to the user and provide implementations of the grouping
operations, primarily in cython. These classes (BaseGrouper and BinGrouper)
are contained *in* the SeriesGroupBy and DataFrameGroupBy objects.
"""
from __future__ import annot... |
6c70557c8647df35f0d1a6f955b8b6bcd83ff45430413c32341af729d972c28a | Python | 51,138 | 1,480 | """A module for plotting functions."""
import copy
import os
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Literal
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd # type: ignore
import seaborn as sns # type: ignore
from matplotlib.axes import Axes
from matplotlib.fi... |
e4e142176c80f8d11ae7222bd0ebc84ccd84a32f33fb69cb8f06564d8b47c2c0 | Python | 51,248 | 1,384 | ''' This program will use JSON data to update neuronbridge.publishedURL and create
an order file to upload imagery to AWS S3.
'''
__version__ = '2.6.0'
import argparse
import collections
from copy import deepcopy
from datetime import datetime
import json
from operator import attrgetter
import os
import re
import s... |
03fa36ff9a3a8520e72de0e463dbd90b2d95a8244eb20f0dd8935e1ce5216239 | Python | 51,390 | 1,265 | """Supervised and unsupervised losses implemented in pytorch.
The lightning pose package defines each loss as its own class; an initialized loss
object, in addition to computing the loss, stores hyperparameters related to the loss
(weight in the final objective funcion, epsilon-insensitivity parameter, etc.)
A separa... |
a61e181f39a61d4252febe8d6fb9287c2c1987f45986c49183134826cc8e42a4 | Python | 51,479 | 1,421 | """
PDB structure handling based on MMTF format
Authors:
Thomas A. Hopf
"""
import io
from collections import OrderedDict
from collections.abc import Iterable
import gzip
from io import BytesIO, TextIOWrapper
from os import path
from urllib.error import HTTPError
import numpy as np
import pandas as pd
import reques... |
5b17063442920b90b7151fa2f2bd049beef474a91d92c49816c86d6df9b1f2e8 | Python | 51,517 | 1,512 | """
Tests of pandas.tseries.offsets
"""
from __future__ import annotations
from datetime import (
datetime,
timedelta,
)
from dateutil.relativedelta import relativedelta
import numpy as np
import pytest
from pandas._libs.tslibs import (
NaT,
Timedelta,
Timestamp,
conversion,
timezones,
)... |
48ecbe0dc59269653c53dff0d45ffa962290566791ec75af490f42c353ed94f4 | Python | 51,585 | 1,368 | from __future__ import annotations
from datetime import (
datetime,
timedelta,
timezone,
)
from functools import partial
from operator import attrgetter
import zoneinfo
import dateutil
import dateutil.tz
from dateutil.tz import gettz
import numpy as np
import pytest
from pandas._libs.tslibs import (
... |
ca48b0f1f413ef0907ef633e479686d23a44bad2bf3c021a53b39c1c67e7d478 | Python | 51,666 | 1,107 | # -*- coding: utf-8 -*-
from sdna.net.core.interleaver import *
from sdna.net.core.layers import *
from copy import deepcopy
class DecoderBase(torch.nn.Module):
def __init__(self, arguments):
"""
Class serves as a decoder template, it provides utility functions.
:param arguments: Argument... |
27634ce9a84f325685b81d84449bc3756798797a9166cd4fe7090a9f0e0f9d21 | Python | 51,673 | 1,227 | ######################
### Import Library ###
######################
# my library
from locale import normalize
from molgraph.utilsonehot import *
from molgraph.utilsmol import *
from molgraph.utilsgraph import *
# standard
import os as os
import numpy as np
import pandas as pd
from collections import defaultdict
from ... |
9c27e4ee7a70752c6d1411786c9aecfbeba56b7baaf728406b7756f2717b01b4 | Python | 51,681 | 1,357 | # Delay added to joint angle feedback.
from numpy import *
# for using np.sum and np.abs (since standard library has these as well)
import numpy as np
from scipy.linalg import solve
from scipy.integrate import solve_ivp, quad
from scipy.optimize import minimize
import matplotlib.pyplot as plt
import numba
# for makin... |
83524ae61d9cc4e960f399e8fbf62b843ee1d61e42d9d2e72fc2c562213a4501 | Python | 51,686 | 1,324 | # Time-stamp: <2025-02-10 08:46:48 Tao Liu>
import pytest
from MACS3.Signal.BedGraph import bedGraphTrackI
from MACS3.IO.PeakIO import PeakIO
import math
from array import array
import numpy as np
from scipy.stats import chi2
from MACS3.Signal.BedGraph import (bedGraphTrackII,)
from MACS3.Signal.ScoreTrack import ... |
cb1035d8d57aa158b45a10d6798a8ffaeed2c6fcebc37ea78acbf73fa1a22f8c | Python | 51,716 | 1,278 | # 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... |
62e24fea88ceb10a4c35c9852ae41cc180d8a90f920276e4246de6a5e9b5cc34 | Python | 51,785 | 1,510 | from __future__ import annotations
import re
import warnings
import numpy as np
import pytest
from pandas._libs import (
NaT,
Timestamp,
)
from pandas._libs.tslibs import to_offset
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.dtypes import PeriodDtype
import pandas as pd
import pandas._... |
a45d919fa56fcaadf307b9ae89816932f5416616bdf3368f37770cea98028a2e | Python | 52,217 | 1,372 | """Classes for calculating connectivity between signals.
CLASSES
-------
ConnectivityCoherence : subclass of the abstract base class 'ProcMethod'
- Calculates the coherence (standard or imaginary) between signals.
ConectivityMultivariate : subclass of the abstract base class 'ProcMethod'
- Calculates the multivar... |
447b93bed41ae8c3d1ed22d93a83989c01ef593e7816aeab0224b34f756d0154 | Python | 52,282 | 1,576 | # 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... |
8c37e3768ac57917f78becb3803a94480ac081eff11b9fd370120a977b2ed021 | Python | 52,507 | 1,190 | import ntpath
from sys import path as sys_path
sys_path.append('/cis/home/kstouff4/Documents/MeshRegistration/MeshLDDMMQP/master-KMS/py-lddmm/')
sys_path.append('/cis/home/kstouff4/Documents/MeshRegistration/MeshLDDMMQP/master-KMS/py-lddmm/base')
import os
from base import loggingUtils
import multiprocessing as mp
from... |
2f759303e3452de874b3360d324b1721e943e395224d4b602907678114e8ca28 | Python | 52,524 | 1,480 | import csv
from io import StringIO
import os
import numpy as np
import pytest
from pandas.errors import ParserError
import pandas as pd
import pandas._testing as tm
import pandas.core.common as com
from pandas.io.common import get_handle
class TestDataFrameToCSV:
def read_csv(self, path, **kwargs):
pa... |
94f7a05309b0d9b1f6dc1069e4c6e82cb706b6297cd3b820496490afc85ac217 | Python | 52,563 | 1,411 | # 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... |
0b25fa23373fc400575e81578c824198d1fd54a420ec1c62b6bebc822b0e3e0b | Python | 52,580 | 1,393 | from __future__ import annotations
from datetime import (
datetime,
timedelta,
timezone,
)
from functools import partial
from operator import attrgetter
import re
import zoneinfo
import dateutil
import dateutil.tz
from dateutil.tz import gettz
import numpy as np
import pytest
from pandas._libs.tslibs imp... |
fe12ff95a985092d868b8d4808f1130bda8084ede9c1900ff1227793e95da11e | Python | 52,709 | 1,272 | from windseer.utils import divergence
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors as colors
import numpy as np
from matplotlib.widgets import Slider, RadioButtons
import torch
import math
import copy
class PlotUtils():
'''
Class providing the tools to plot 3D data.
... |
dafeb22c2d85919c288d96f05979a23e3bd56a3cf67dc876956a7cf603368156 | Python | 52,849 | 1,171 | """CBMA methods from the multilevel kernel density analysis (MKDA) family."""
import gc
import logging
import nibabel as nib
import numpy as np
import sparse
from joblib import Parallel, delayed
from pymare.stats import fdr
from scipy import ndimage
from scipy.stats import chi2
from tqdm.auto import tqdm
from nimare ... |
60f90a9c423a3836cf1b2064ff82835876d369dc4eaac68d82a2301d12a69c3e | Python | 52,859 | 1,472 | from __future__ import annotations
from datetime import timedelta
import operator
import textwrap
from typing import (
TYPE_CHECKING,
Self,
cast,
)
import numpy as np
from pandas._libs import (
lib,
tslibs,
)
from pandas._libs.tslibs import (
Day,
NaT,
NaTType,
Resolution,
Tic... |
f851fe0881128573e952af6691e07f0b47b7a3031a8d9c431457e80e7e3a12bf | Python | 52,942 | 1,067 | '''
Created on Nov 17, 2012
@author: regger
'''
import os
import time
from collections import Sequence
import numpy as np
from .cell import PointCell, SpikeTrain
from . import reader
from . import writer
from .synapse_mapper import SynapseMapper
#import synapse
from neuron import h
import six
from . import network_m... |
ab15f5f60d8374a8afe6507b0077e3769df56ed63df5d112ac78fcca15867130 | Python | 52,956 | 1,617 | # Module: containers.models.classification
# 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 classification models. The `classification` module will
# call `get_all_model_containers()`, which ... |
ef35385c4b3141d518712e9e7a2a499eebb361ace64e1085b83dfe89b4028047 | Python | 52,983 | 1,475 | from __future__ import annotations
from datetime import timedelta
import operator
import textwrap
from typing import (
TYPE_CHECKING,
Self,
cast,
)
import numpy as np
from pandas._libs import (
lib,
tslibs,
)
from pandas._libs.tslibs import (
Day,
NaT,
NaTType,
Resolution,
Tic... |
f201a45f5faaa7db1372ef20eb67d1b0292098ae4bc8b07e4c28971bcf95042e | Python | 53,014 | 1,157 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gs
import os
import scipy
from tqdm import tqdm
import pickle
import itertools
from utils import update_plot_defaults, get_scaled_sigmoid, get_BTSP_function, get_simple_BTSP_function, Volatile_Resistor
##################################... |
fcb42dba4dda40ede60c7c8c96a998d7a54775c61dba61420317de23febd5bfd | Python | 53,241 | 1,726 | """
Base and utility classes for pandas objects.
"""
from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
Generic,
Literal,
Self,
cast,
final,
overload,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._typing import (
AxisInt,
... |
3e42ec459ab25a7a33f44618030b509ea9f6ce57a22d7793523544ccd7c3cd4b | Python | 53,324 | 1,728 | """
Base and utility classes for pandas objects.
"""
from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
Generic,
Literal,
Self,
cast,
final,
overload,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._typing import (
AxisInt,
... |
efb4be20dde49dd3129b39dbf249f5c158a91b6e3f4fbdf9278c3e3f1e74680e | Python | 53,367 | 1,286 | """
Read SAS7BDAT files
Based on code written by Jared Hobbs:
https://bitbucket.org/jaredhobbs/sas7bdat
See also:
https://github.com/BioStatMatt/sas7bdat
Partial documentation of the file format:
https://cran.r-project.org/package=sas7bdat/vignettes/sas7bdat.pdf
Reference for binary data compression:
http:/... |
8c051ce6bfedfb4c45271b329cb69fa8e20a8eb4196c50acaca5469675c01a9b | Python | 53,370 | 1,020 | #!/usr/bin/env python
'''
GUI taking CaImAn processed 1-photon data (hdf5 file) displaying spatial/temporal components
of different groups ('All', 'Accepted', 'Rejected', 'Unassigned') under various mode:
- 'reset': initialization (show contours of the current group)
- 'neurons': show colormap of the current group,... |
d729160d9c222ebe43a0b25055713c879933a9ed0fefbb9ee38bd5a913f28021 | Python | 53,402 | 1,480 | # 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... |
ad7128041c87a58d7d7798bae19e3b775336e102fa98c13c01ccbca85cd5ce3e | Python | 53,585 | 1,462 | from datetime import (
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.tslibs.per... |
6727b15cda4b3ba7fe2af536741238f2702a32c6aeb09994b08eefd9e8f0a572 | Python | 53,687 | 2,142 | """
This file is very long and growing, but it was decided to not split it yet, as
it's still manageable (2020-03-17, ~1.1k LoC). See gh-31989
Instead of splitting it was decided to define sections here:
- Configuration / Settings
- Autouse fixtures
- Common arguments
- Missing values & co.
- Classes
- Indices
- Serie... |
3ec54e6f63b357c96d9e696de99ddc0a66d04e785544382f202b7475a7f02dcf | Python | 53,948 | 991 | from __future__ import division
from __future__ import print_function
import time
import argparse
import pickle
import os
import datetime
from tqdm import tqdm
from pathlib import Path
from sklearn import metrics
import warnings
warnings.filterwarnings("error")
import torch
torch.set_num_threads(4)
torch.set_defa... |
4da0d48fc3e3e016b8f8c4307c8e0a075c1a67ded89d81c6b72acc0d3583a768 | Python | 54,018 | 1,533 | # 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... |
2575e6c5e5b9cd767b5e5f8f7995b5154767f62847ad95f914e6716514e573cd | Python | 54,150 | 1,449 | # 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... |
8f6d73a705383701f1bb71751cf7d09ce9e0e404ac4d00a98d26f9218b84c6d7 | Python | 54,359 | 1,651 | 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... |
385abe31522a84a49701c4b4756cb4673add6ec6b95e2d1ffb835df9ce042da9 | Python | 54,656 | 1,010 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Monolithic entry point for the BASALT pipeline (CheckM2 / default branch).
This module wires together autobinning, dereplication, outlier removal,
contig retrieval and reassembly. It uses the non-CheckM variants of
the core steps and is the default path when quality_c... |
abbad2f5eb6478f679eb91b81ef564d62409a4f4a8ff30138b8cc06d0e27c00d | Python | 54,766 | 1,665 | import numpy as np
import pytest
from pandas.compat import HAS_PYARROW
import pandas as pd
import pandas._testing as tm
from pandas.tests.copy_view.util import get_array
from pandas.util.version import Version
def test_copy():
df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6], "c": [0.1, 0.2, 0.3]})
df_copy... |
250e4d31af792c148ca9e3e927995b06f70aa3fbeaacdee9a1c2f7aa0cc9ac3e | Python | 55,140 | 1,738 | """
Protein sequence alignment creation protocols/workflows.
Authors:
Thomas A. Hopf
Anna G. Green - complex protocol, hmm_build_and_search
Chan Kang - hmm_build_and_search
"""
from collections import OrderedDict
from collections.abc import Iterable
import re
from shutil import copy
import os
import numpy as ... |
da11eca7e0efa304dc16d74aee5ae607397c904ab4989a90375cd0e9e248b4a9 | Python | 55,255 | 1,280 | # 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... |
0f1e909b034479eddc52b0733284084b1da9cdf60032841105217fd6ed05d1a6 | Python | 55,371 | 1,370 | """
This is the main implementation of UrsonNet.
Disclaimer:
Part of this code was adapted from
https://github.com/matterport/Mask_RCNN
Copyright (c) 2017 Matterport, INC.
Licenced under the MIT Licence
TODO:
- layer_regex replace 'fpn' and 'pose_'
"""
import os
import random
import datetime
import re
import math
... |
279a42241a6683151ca56e62842216b837a50fb9084115ab63f76c366687d95a | Python | 55,413 | 1,346 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2026, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... |
b1b63420b00613631114a7c7353a578967351e80dd1d055313941b9d575180fd | Python | 55,533 | 1,476 | """This script is used to generate Current Source Density Estimates, using the
kCSD method Jan et.al (2012).
"""
import numpy as np
from numpy.linalg import LinAlgError, svd
from scipy import special, integrate, interpolate
from scipy.spatial import distance
from . import utility_functions as utils
from . import basi... |
9360652f9d633b2581233aeefd96eec8062468b9ac83f7b7b7ab32ef11abac0d | Python | 55,807 | 1,461 | #!/usr/bin/env python
# Time-stamp: <2025-09-29 14:57:48 Tao Liu>
import unittest
from MACS3.Signal.PairedEndTrack import PETrackI, PETrackII
from MACS3.Signal.PileupV2 import (pileup_from_LRC,
pileup_from_LRC_centers_as_list,
over_two_pv_array)
fro... |
72e24f656120a15cce5bb167c4b1d7712b7d2e0ce20e71050885010e45af18fc | Python | 55,850 | 1,366 | # 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... |
5b31110257e7ab3efbd313b42a1f5beb0e98866c79ac4d4510cdadc933e09824 | Python | 56,057 | 1,356 | # 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.