sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
b10a68b7035208feef5f4967220c116af70068ad915a5a92d02ce79c14d5078c | Python | 42,994 | 1,107 | # 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... |
999bd1c514b6b4738b759cfc3b2833c16d29325a3d2aa784b6a0af835a347b8d | Python | 43,040 | 1,176 | # 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... |
1b3e482f5c56130b0e519172f357b7c5c50f5fb8544d6c3c64cf3749f8332e56 | Python | 43,043 | 933 | """Topic modeling with generalized correspondence latent Dirichlet allocation."""
import logging
import os.path as op
import nibabel as nib
import numpy as np
import pandas as pd
from nilearn._utils import load_niimg
from scipy.stats import multivariate_normal
from .. import references
from ..base import NiMAREBase
f... |
a0a297e44ec76c8a423b4139cf9397dc49855b2c97285987b5bed9d0e5686acf | Python | 43,064 | 1,091 | # 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... |
2ca4c41c1d7ea1bc8f5f6f2ece0a96ba5965d2c15d9245b1d19d8ffe3e2ab8f3 | Python | 43,108 | 1,218 | # 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... |
bb6c1a7b1ab65156e55b7985270b83859c6b9d90bd06dfcc3a0cbee7a4f8f436 | Python | 43,376 | 1,079 | # 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... |
e2f6ef8c7051f13b560a1a7e3f9c275c375b85f77f9881845c06f268cbfcc0a5 | Python | 43,382 | 1,078 | # 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... |
f98eb3c9d3cb0a9d6895c31e83dbd7a0a640fe0ff3de040a023e69445a67fcca | Python | 43,479 | 1,180 | #! /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... |
2aa7db691a86a293e00dbee87fb9a329290979b304d65ebcb34edbded70ef953 | Python | 43,578 | 1,193 | # -*- coding: utf-8 -*-
'''
py-iCSD toolbox!
Translation of the core functionality of the CSDplotter MATLAB package
to python.
The methods were originally developed by Klas H. Pettersen, as described in:
Klas H. Pettersen, Anna Devor, Istvan Ulbert, Anders M. Dale, Gaute T. Einevoll,
Current-source density estimation ... |
de61fc0ee696d8968b023d8affe23ac5e8faa6e547d35e429704480a083feb82 | Python | 43,598 | 1,270 | from __future__ import annotations
import contextlib
import datetime as pydt
from datetime import (
datetime,
tzinfo,
)
import functools
from itertools import chain
from typing import (
TYPE_CHECKING,
Any,
cast,
)
import matplotlib as mpl
import matplotlib.dates as mdates
import matplotlib.units a... |
5310c321d5c06d050ff362dbc2df5e62a4838b47c4ba36cc5dc68d9bf61e1259 | Python | 43,730 | 898 | """Trim command line interface.
"""
import logging
import sys
from atropos.commands.cli import (
BaseCommandParser, configure_threads, parse_stat_args, readable_file,
readwriteable_file, writeable_file, positive, probability, CharList,
Delimited, int_or_str)
from atropos.io import STDOUT, STDERR
class Comm... |
cff3b28929bf24b681000a6bc8824ee394f9e9d6ebf13cb8e6225d1824994c3d | Python | 43,757 | 1,028 | #!/usr/bin/env python
"""Module Description: Test functions of the filterdup subcommand
(MACS3/Commands/filterdup_cmd.py), called directly and through
``macs3 filterdup``.
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 dis... |
03465c1027f41262cb13c73922fd6b0259012fbb289c8e003807ca48c1c4f81c | Python | 43,772 | 1,271 | from datetime import datetime
import numpy as np
import pytest
import pandas.util._test_decorators as td
from pandas.core.dtypes.common import is_scalar
import pandas as pd
import pandas._testing as tm
@pytest.fixture(params=["default", "float_string", "mixed_float", "mixed_int"])
def where_frame(request, float_s... |
4657e8d4b93d4eb084447bc7d0d9f9b2f42a4c1a244d045ca6df7064988e5fd7 | Python | 43,776 | 1,164 | """
Credits to Taehoon Kim
"""
from spycon.spycon_inference import SpikeConnectivityInference
import numpy
from scipy.stats import norm
import multiprocessing
from itertools import repeat
import scipy.special as special
import numpy as np
import math
import csv
from copy import copy
from tqdm import tqdm
class GLMC... |
ff51d504cf00f28220c169ce1e4fb37e364dbed34652027400ca878580bed19b | Python | 43,776 | 1,213 | import numpy
from scipy.ndimage import _ni_support
from scipy.ndimage.morphology import distance_transform_edt, binary_erosion, \
generate_binary_structure
from scipy.ndimage.measurements import label, find_objects
from scipy.stats import pearsonr
def jc(result, reference):
"""
Jaccard coefficient... |
db856ae30d6e50677b6810ab52eb79bcc9e5ed5d18f03a7ca718a624e49404a0 | Python | 43,913 | 1,359 | from __future__ import annotations
import itertools
from typing import (
TYPE_CHECKING,
Any,
Literal,
cast,
)
import numpy as np
from pandas._libs import lib
from pandas.util._decorators import set_module
from pandas.core.dtypes.cast import maybe_downcast_to_dtype
from pandas.core.dtypes.common impo... |
3e26a07ddaed5d7f1e700300c4b8141048f001bd32f22b5c8e6074004fb99959 | Python | 43,925 | 1,130 | from datetime import (
UTC,
datetime,
)
import re
import warnings
import zoneinfo
import dateutil
import numpy as np
import pytest
from pandas._libs.tslibs.ccalendar import (
DAYS,
MONTHS,
)
from pandas._libs.tslibs.period import IncompatibleFrequency
from pandas.errors import InvalidIndexError
impor... |
32e2875f8ddb218396d14c54de74ac4725ec69c0873ec9213bfb598d6e5c7e8d | Python | 43,940 | 1,360 | from __future__ import annotations
import itertools
from typing import (
TYPE_CHECKING,
Literal,
cast,
)
import numpy as np
from pandas._libs import lib
from pandas.util._decorators import set_module
from pandas.core.dtypes.cast import maybe_downcast_to_dtype
from pandas.core.dtypes.common import (
... |
2b4c843642f5cce7ced232237767b1766853be321270c6ed1ba29cb0aaeb1864 | Python | 43,957 | 1,089 | import pathlib
import importlib.resources
import signal
import sys
import traceback
import warnings
import webbrowser
import dclab
from dclab.lme4 import rsetup
import h5py
import numpy
import scipy
from PyQt6 import uic, QtCore, QtGui, QtWidgets
from PyQt6.QtCore import QStandardPaths
from PyQt6.QtWidgets import QMe... |
9a05009273de03f826fe0c1a717b923dbce614c8c7823c212dfe11de59e11c32 | Python | 43,976 | 1,267 | # 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... |
bc1a062b88d8beafba0f247705a1e44c4e34ebc86368dd64833c19ed5ba4e74c | Python | 44,004 | 1,072 | import collections
import importlib.resources
import pathlib
from typing import Dict, Literal, Tuple
import dclab
import numpy as np
from PyQt6 import uic, QtCore, QtWidgets
import pyqtgraph as pg
from scipy.ndimage import binary_erosion
from ..compute.comp_stats import STAT_METHODS
from ... import idiom
from ..widge... |
1c88e26c7f9d26a905742f633180c9d34001f40e10ec3802f0b45f32d491104b | Python | 44,086 | 1,151 | import re
import sys
import numpy as np
import pytest
from pandas._libs.sparse import IntIndex
from pandas.compat import PYPY
import pandas as pd
import pandas._testing as tm
from pandas.core.arrays.sparse import SparseArray
@pytest.fixture
def arr_data():
"""Fixture returning numpy array with valid and missin... |
ad8ac5c7c07cfc97716c03a5a9db4600e3a148c3fb3859696d3ec4d877a57dac | Python | 44,090 | 853 | """ Implementation of all available options """
import configargparse
from onmt.models.sru import CheckSRU
from onmt.transforms import AVAILABLE_TRANSFORMS
from onmt.constants import ModelTask
from onmt.modules.position_ffn import ACTIVATION_FUNCTIONS
from onmt.modules.position_ffn import ActivationFunction
def conf... |
0f24db95a8ee47131bc9f55cb7331596a5921bc19144ec833c40e845db174443 | Python | 44,123 | 1,236 | # 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... |
ff8ddbec2ed7ae7fe23f12237ba41d38d597a39b08e84f8a776e670a61ed42cd | Python | 44,223 | 1,154 | # 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... |
97017f4429ecb35ab6d21c3a20083ae8d6b1f39367cc77279bfbbce2c5c75aaa | Python | 44,275 | 861 | 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_defau... |
232d77430ec4c8e1b8e75a3d40fddd1a4f354957c311c912bdb7fdebd5a62532 | Python | 44,282 | 1,224 | # 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... |
d286965e327303700e21e2d773db6fb404d98016785631cb2a530d0b576756b2 | Python | 44,319 | 1,312 | # 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... |
e27cc80c84cf9c15ff9246a6e239b8bfb9a64ce47447e6590f1284bf23fba902 | Python | 44,319 | 975 | import re
import numpy as np
import pysam
from src.align_op import fetch_ref_seq, collect_and_boost_supp_aligns, Align, update_coverage_by_aligns, cal_align_mismatch_ratio
class DetailCigar:
def __init__(self, op, op_len, ref_chrom, ref_start, ref_end, strand):
self.op = op
self.hybrid_length = o... |
62e4c61332c295dadcf2aecb0e6fb5d4ac97480bd22972ad2dde8719494b6fc7 | Python | 44,364 | 1,321 | import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
import pandas._testing as tm
from pandas.core.reshape.concat import concat
from pandas.core.reshape.merge import merge
@pytest.fixture
def left():
"""left dataframe (not multi-indexed) for multi-index join tests"""
... |
da5bb49a4e5c07ed296bc2193581516598c03c9575eab676f1f0b2da529697d9 | Python | 44,466 | 1,032 | # Copyright 2019 Image Analysis Lab, German Center for Neurodegenerative Diseases (DZNE), Bonn
#
# 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... |
b6c107b3e5edf9ff24364e0730ccfa2177a905424180e9ea2779f7b778efa68c | Python | 44,614 | 1,010 | """
Title: CA1_pyramidal_cell.py
Author: Matus Tomko
Mail: matus.tomko __at__ fmph.uniba.sk
"""
import numpy as np
import neuron
from neuron import h, load_mechanisms
import sys
from CA1_plasticity.model.utils import RecordingVector
from CA1_plasticity.model.utils import Synapse
def single_pulse_NetStim():
"""Se... |
d112fff9e3b6580c66ba8d7350cbbde43fb789b6e27cba8332cecff758fc0eb4 | Python | 44,672 | 920 | ### Version two: at every time step, update the estimated interaction type for every edge
###
###
###
from __future__ import division
from __future__ import print_function
import time
import argparse
import pickle
import os
import datetime
from tqdm import tqdm
# from multiprocessing import Pool
from pathlib import... |
53b1c650c8385a426e1d25c4f7d90b70b75e4136bb19b28dc95400d6e84b8c11 | Python | 44,705 | 1,285 | #!/usr/bin/env python
from __future__ import (
print_function,
division,
unicode_literals,
absolute_import,
)
import os.path as op
from nipype.interfaces.base import traits, TraitedSpec, File, InputMultiObject, Undefined, CommandLineInputSpec, CommandLine, isdefined
from nipype.interfaces.mrtrix3.bas... |
6a8e800a921ef5f1ac1a3e4d546a10b77140fcbd1e011ea7372bd17e867d24be | Python | 44,783 | 1,150 | from datetime import (
UTC,
datetime,
)
import re
import warnings
import zoneinfo
import dateutil
import numpy as np
import pytest
from pandas._libs.tslibs.ccalendar import (
DAYS,
MONTHS,
)
from pandas._libs.tslibs.period import IncompatibleFrequency
from pandas.errors import InvalidIndexError
impor... |
3e10e4fc709a5f0a369158b848f056d916b7a3c2cc8b4cb692b8cc6f8776e4e2 | Python | 44,815 | 1,095 | from scipy.optimize import differential_evolution
from scipy.integrate import odeint
import pickle
import sys
from scipy.ndimage import laplace
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm
import pickle
import tensorflow as tf
import random as random
from keras.layers import Layer
from k... |
fbc0dad759ad8d293a16dee7e87bbd064ea2374b933dbb0bba644d8a5ac6a02d | Python | 44,839 | 1,523 | from datetime import datetime
from textwrap import dedent
import pytest
import pandas as pd
pytest.importorskip("jinja2")
def _dedent(string):
"""Dedent without new line in the beginning.
Built-in textwrap.dedent would keep new line character in the beginning
of multi-line string starting from the new... |
2a930abbeaa57d99de8c05db161025e306d62ec7eb12191c5d171cc8ae486475 | Python | 44,968 | 938 | ### Version two: at every time step, update the estimated interaction type for every edge
###
###
###
from __future__ import division
from __future__ import print_function
import time
import argparse
import pickle
import os
import datetime
from tqdm import tqdm
# from multiprocessing import Pool
from pathlib import... |
10281251e89a726052c75e126a717ac6c9361816fef924ea3672c73960a9c556 | Python | 44,976 | 1,485 |
import torch
import torch.nn as nn
import torch.legacy.nn as lnn
from functools import reduce
from torch.autograd import Variable
class LambdaBase(nn.Sequential):
def __init__(self, fn, *args):
super(LambdaBase, self).__init__(*args)
self.lambda_func = fn
def forward_prepare(self, input):
... |
6eea903ea3f1ecd1b15b833ef03b21b7343e95ae667ba6813c173d7f3d057290 | Python | 45,117 | 1,146 | # Copyright 2023 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... |
700c194b543c181b5ccf17b08d6f6194860abf83cb23a2215bc6c205cc3244ee | Python | 45,134 | 1,101 | # 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... |
8f9bcccb1fed995a7dc1b52d1bcdda4d446f6397d1f82dbd390e46003c5307e5 | Python | 45,136 | 1,124 | import operator
import re
import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.core import roperator
from pandas.core.arrays.sparse import SparseArray
@pytest.fixture(params=["integer", "block"])
def kind(request):
"""kind kwarg to pass to SparseArray"""
return reque... |
60f3a1a2b47b1fadb77a106e6f52458c1739262eb603b27632718c88287b5156 | Python | 45,153 | 886 | 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
import itertools
import math
import warnings
warnings.filterwarnings("error")
import torch
torch.set_num_threads(4)
torch.set_def... |
af482613284e8e170f1886f248ee71400be3bdf577f706840deff4e3719b50df | Python | 45,167 | 1,252 | import argparse
import numpy as np
import plotly.graph_objects as go
import plotly.express as px
import plotly.colors
import dash
from dash import dcc, html, dash_table, ALL, MATCH, Patch
from dash.dependencies import Input, Output, State
from dash.exceptions import PreventUpdate
import base64
from cdr.config import ... |
9ba39d1109dd345784cc0db25fc863b0b5872586a1b14acdfcd02972d478c865 | Python | 45,174 | 1,221 | # 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... |
086097263f58ecbf7900596a511ae51b04ae7cce1b77d23a6287b2dcc60e6151 | Python | 45,212 | 1,277 | import re
import warnings
import weakref
import numpy as np
import pytest
from pandas._libs.tslibs.dtypes import NpyDatetimeUnit
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.base import (
ExtensionDtype,
_registry as registry,
register_extension_dtype,
)
from pandas.core.dtypes.common... |
f963244d6a6ad8e57e0c2fdc6702061112eadd1d0295baa7c38d97eef9c7a72a | Python | 45,233 | 1,247 | """
Bayesian Linear Regression (BLR) implementation.
This module implements Bayesian Linear Regression with support for:
- L1/L2 regularization
- Automatic Relevance Determination (ARD)
- Heteroskedastic noise modeling
- Multiple optimization methods (CG, Powell, Nelder-Mead, L-BFGS-B)
The implementation follows stan... |
6d530f88cb35de2b48936f5b84482acbbe617e8dfe46b29c63742fd2c71f25d1 | Python | 45,246 | 729 | ##############################################################################
## ##
## This file is part of ModelBlocks. Copyright 2009, ModelBlocks developers. ##
## ##
#... |
a2a27632004c5fb882f801691e517a153e8f02b0eb0670aa18fd362505dc4659 | Python | 45,289 | 983 | import os
import scipy.linalg as spLA
import logging
import time
from . import surfaces
#import pointEvolution_fort as evol_omp
from . import conjugateGradient as cg, kernelFunctions as kfun, pointEvolution as evol
from . import surfaceMatching
from .affineBasis import *
## Parameter class for matching
# timeSte... |
12c4e2f4d3f90685c103483e7b993e83a5c75e1c77742f8d356cef771015e129 | Python | 45,326 | 1,349 | from datetime import (
datetime,
timedelta,
)
from io import StringIO
import re
import sys
from textwrap import dedent
import numpy as np
import pytest
from pandas._config import using_string_dtype
from pandas.errors import Pandas4Warning
import pandas.util._test_decorators as td
import pandas as pd
import ... |
74606569fbdf3c5691983268f6c1d6e78c7e8726ba20c4519951d72081516984 | Python | 45,347 | 1,244 | # Module: internal.tunable
# Author: Antoni Baum (Yard1) <antoni.baum@protonmail.com>
# License: MIT
# Provides a VotingClassifier which weights can be tuned.
import inspect
from sklearn.base import clone
from sklearn.ensemble import VotingClassifier, VotingRegressor
from sklearn.neural_network import MLPClassifier,... |
4765085c14702ee515c036798fad279f9715b14b50d9b7548d612991765488ce | Python | 45,366 | 1,322 | from __future__ import annotations
from functools import partial
import operator
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
cast,
overload,
)
import warnings
import numpy as np
from pandas._config import using_string_dtype
from pandas._config.config import _global_config as confi... |
d1b98a1ce6ef437bf89fa1185c2cd53271115195ba5245675ffddc690f3f02c4 | Python | 45,387 | 1,130 | '''
This module implements a framework to
What should I do if
- I run my reduced model but the strategies are not executed remotely?
--> make sure, the strategy has a Solver registered
'''
import sklearn.metrics
import scipy.optimize
import numpy
from model_data_base.analyze.spike_detection import... |
075801ca3614e1f5f829b7d4e0fbeb096eed1fdaf8094ad82449c0616d04995a | Python | 45,465 | 1,320 | from __future__ import annotations
from functools import partial
import operator
from typing import (
TYPE_CHECKING,
Any,
Literal,
Self,
cast,
overload,
)
import warnings
import numpy as np
from pandas._config import using_string_dtype
from pandas._config.config import _global_config as confi... |
40dcb57d009ccb96f56041333b4563c6305adbf9a323a4ed31c6b10669444a18 | Python | 45,471 | 1,256 | import numpy as np
from scipy.optimize import root as root
from scipy.optimize import root_scalar as root_scalar
import pumpprobe as pp
class ExponentialConvolution:
def __init__(self,gs,A=1.):
if gs is not None:
self.n_branches = 1
g1 = gs[0]
exp1 = {"g":g1,"factor... |
ae28dc0d14a22e602341b188b11cb45fe72df65e5bc0721373256ed56dabb2f4 | Python | 45,475 | 1,282 | """test fancy indexing & misc"""
import array
from datetime import datetime
import re
import weakref
import numpy as np
import pytest
from pandas.errors import IndexingError
from pandas.core.dtypes.common import (
is_float_dtype,
is_integer_dtype,
is_object_dtype,
)
import pandas as pd
import pandas._t... |
95127c58bc3f6bc0c020da26ddd457372e3d3fd583c5861f1c784a947ff639f7 | Python | 45,479 | 1,248 | """Class for performing SSD."""
from copy import deepcopy
from typing import Any
from matplotlib import pyplot as plt
from mne import time_frequency
from mne.decoding import SSD
import numpy as np
from coh_exceptions import ProcessingOrderError
from coh_handle_entries import (
combine_dicts,
combine_vals_list,... |
bb82320e7c5064d0637678a46a28521059146ff31f2ad518da52e78ac2b514c9 | Python | 45,525 | 1,250 | # 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... |
4a64b11463749cc36090d6182ed971d87ed96955463c95de9a42ea9278e23165 | Python | 45,531 | 1,098 | # 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... |
1580d2dd9a16d4afcd93b19b68e022a6d26e5c4648d07ef654c90155744bd345 | Python | 45,770 | 1,302 | # 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... |
4c88ae772fadcb62bc9627b7f10588b3efdbd9d18848f09f0c820fba48ab087f | Python | 45,788 | 1,124 | """
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:/... |
c8847ee0ac8d559b89f2f4d0ec1a05ee1dde6d3a06d141014705a27890a07405 | Python | 45,860 | 1,146 | import operator
import re
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
from pandas.core import roperator
from pandas.core.arrays.sparse import SparseArray
@pytest.fixture(params=["integer", "block"])
def kind(request):
"""kind kwarg ... |
69249156975bc17b9887281edb42fec3c78deebddc426479371d6617e3038062 | Python | 45,875 | 708 | import argparse
import os
import pandas as pd
def get_args():
"""
Get arguments from command line with argparse.
"""
parser = argparse.ArgumentParser(
prog='Perform-bin-comparisons.py',
description="""Use filtered tsv files from Filter-Checkm2-Bins.py to perform comparison and consolida... |
6b888e366fbc4d71b82d8bedc810bf9653595bbaf7de28e61bcf39beb94c29dc | Python | 45,910 | 813 | # 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... |
6e4bf2988dd47f0483bd743d78f7481501840ed5d162e49efa416bd637eafc76 | Python | 45,947 | 1,198 | # 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... |
ca539900a8e65da690e13911c9abfd29177142dacb6a5d4bf7da163e8cde2511 | Python | 45,987 | 1,176 | # 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... |
49c7b8c234d6c2daaf858a9cc724fbd465b2eaf8aa370e7255596e4b076a03cb | Python | 45,992 | 1,338 | import re
import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
@pytest.fixture
def df():
res = pd.DataFrame(
np.random.default_rng(2).standard_normal((10, 4)),
columns=pd.Index(list("ABCD")),
index=pd.date_range("2000-01-01", periods=10, freq="B"),
)
... |
e869fd5f219a1bba5157623d8d9d6be2b61dcd13d6a63151d8e8da2042dd8e27 | Python | 46,049 | 1,304 | import re
import warnings
import weakref
import numpy as np
import pytest
from pandas._libs.tslibs.dtypes import NpyDatetimeUnit
from pandas.errors import Pandas4Warning
from pandas.core.dtypes.base import (
ExtensionDtype,
_registry as registry,
register_extension_dtype,
)
from pandas.core.dtypes.common... |
01e7ea3d98c37956892fc8b7549b268ffece69fc3d540dd8919bd8d55ded92da | Python | 46,140 | 1,470 | # 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... |
0b81b238e53265caa1aa00be1f7a853921607f4766986826e75766faa659f871 | Python | 46,190 | 1,122 | import re
import numpy as np
import pandas as pd
from .util import flatten_dict, names2ix, stderr
op_finder = re.compile('([^()]+)\((.+)\) *')
def z(df):
"""
Z-transform pandas series or data frame
:param df: ``pandas`` ``Series`` or ``DataFrame``; input date
:return: ``pandas`` ``Series`` or ``Data... |
1cb288e57e372b45fdcbfc18734f116e2fafc2e826695d2dbd6783a4294d4f6b | Python | 46,222 | 1,099 | from model_data_base.mdbopen import mdbopen
'''
Created on Mar 8, 2012
@author: regger
'''
labels2int = {\
"Neuron": 2,\
"Dendrite": 3,\
"ApicalDendrite": 4,\
"BasalDendrite": 5,\
"Axon": 6,\
"AIS": 6,\
"My... |
3906a54bdc1ceea2e90daf409baf437007ade439e45b7d6b608574b3a3963b3a | Python | 46,240 | 1,179 | # -*- coding: utf-8 -*-
"""mtscomp: multichannel time series lossless compression in Python."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import argparse
import bisect
from functools impor... |
f9b378210f92be848d582d64be707e5680683ff4217589d3a889506c146cf1b0 | Python | 46,244 | 1,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... |
a9b10300dab9cf42f2d1f6cadb635877e4bd1dc19ea2fba7f38f648aaea46c93 | Python | 46,273 | 1,179 | # 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... |
15b329e36ea69b88ea5bd3e9fa44c1763e64ebc31dbe854b2a890a832b9660ea | Python | 46,335 | 1,448 | # -*- coding: utf-8 -*-
"""
This script generates plots for Figure 3, SI Figs 9-13, and Movies S1 and S2
Some of the plots can only be generated with access to raw microscopy image data
that is not on the zenodo archive.
Created on Tue Jul 12 16:16:25 2022
@author: jeanbaptiste
"""
import pickle
import os
import sys... |
d8782b213f25fcd0850ab2ac423ba18afec5a2b4aea2106ed68b1b09e7742567 | Python | 46,391 | 1,423 | # cython: language_level=3
# Time-stamp: <2025-02-12 18:14:41 Tao Liu>
"""Module Description: For pileup functions.
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License (see the file LICENSE included with
the distribution).
"""
# ------------------------------------... |
33b92c9ec3967a89771a3b90392e6436ba4ad3d296a88c5e195d79b50f0b63d7 | Python | 46,490 | 1,207 | import os, re, sys
import pdb
from bx.intervals.intersection import Interval
from bx.intervals.intersection import IntervalNode
from bx.intervals.intersection import IntervalTree
from collections import defaultdict
from csv import DictReader
class GTF:
def __init__(self, gtf_filename):
self.gtf_f... |
29e56a38c96655763db88ca7bc1d11f72aa8b813ad181e12afb496c1b962540c | Python | 46,559 | 1,374 | import calendar
import datetime
import decimal
import json
import locale
import math
import re
import sys
import time
import tracemalloc
import weakref
import dateutil
import numpy as np
import pytest
import pandas._libs._ujson as ujson
from pandas.compat import IS64
import pandas as pd
import pandas._testing as tm
... |
e3bb4ae609c6b80b2320527ef74e1414ee05b5e13ff3435f21522cea6eac8329 | Python | 46,582 | 1,282 | # 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... |
ab8bdc54c5079ec25e16ea284f1bb20ea38673496c4e057a45fe32daa43ebf50 | Python | 46,602 | 1,389 | 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... |
357ed17f406d550dc2f801c658371d6c5a1fed9ba2408f62f84a8364f1c3fe79 | Python | 46,619 | 1,302 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 7 18:48:08 2023
@author: hklumpe
"""
import glob
import sys
import json
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
username='hklumpe'
dcc_repo_path = f"/projectnb/dunlop/{username}/deepcellcontrol/"
fig_path = dcc_re... |
1cc308f58bc97dc5a7cc228b365cdeb454ef6909b966fc3c2d18ccad45f25e50 | Python | 46,705 | 1,221 | #trajectory_clustering.py
from initialization.initialization import *
from initialization.config import *
# from visualization.trajectory_visualization import *
import os
import numpy as np
import pandas as pd
from scipy.interpolate import interp1d
from scipy.spatial.distance import directed_hausdorff
from sklearn.... |
eb4dec639f7bcc9adb68510cbc3ec07750375d25e3da35e84ee29e8688dc60ae | Python | 46,780 | 1,433 | """
Class and functions for reading, storing and manipulating
multiple sequence alignments.
Authors:
Thomas A. Hopf
"""
import re
from collections import namedtuple, OrderedDict, defaultdict
from copy import deepcopy
from pathlib import Path
import numpy as np
from numba import jit, prange, get_num_threads, set_nu... |
235ab663c691d59edc2d91a3154b3c205328f80cdb306790032df7a8ac5c1e1e | Python | 46,819 | 1,366 | # 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... |
2b54549a88256832dc895e6b88ab2d32efb1be985ad80ac7e1db425b42e4bea4 | Python | 46,831 | 1,090 | from __future__ import absolute_import
import numpy as np
from scipy.stats import pearsonr, spearmanr
from scipy import signal
from scipy.interpolate import InterpolatedUnivariateSpline
def generate_index_distribution(numTrain, numTest, numValidation, params):
""" Generates a vector of indices to partition the da... |
d51ef28dc44eb3a4e79e1cb8e2f485d8a24ae015ed73b95d939912547dbb7cbd | Python | 46,859 | 1,360 | import re
import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
@pytest.fixture
def df():
res = pd.DataFrame(
np.random.default_rng(2).standard_normal((10, 4)),
columns=pd.Index(list("ABCD")),
index=pd.date_range("2000-01-01", periods=10, freq="B"),
)
... |
6506cfd890aad5a53c5c5cded1542aed9304e3c46de424923d4bc379d4aa6da4 | Python | 46,908 | 1,354 | # 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... |
8cc43aef8d095884c6acd203e1fff143e6a2b1142ed286a4e4303e15474a0cd4 | Python | 46,932 | 1,367 | from typing import Any, Dict, List, Optional, Union
import numpy as np
import pandas as pd
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from sktime.split import ExpandingWindowSplitter, SlidingWindowSplitter
from pycaret.internal.plots.utils.time_series import (
PlotReturnType,
... |
6f25e3ab879ca25929bcbb604eeba3aba0930452c058a339f3024bed2f584764 | Python | 47,015 | 876 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Monolithic entry point for the BASALT pipeline (CheckM-based branch).
This module contains a combined implementation that chains autobinning,
refinement, and reassembly. It is largely superseded by the more
modular entry points in ``BASALT_main_c_autobinning``,
``BASA... |
7178e2aacd5bf5657494eaf572eb37b89b10526de8b8f60b041526be1df0247b | Python | 47,061 | 1,245 | # 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... |
a82166ad83dd3ef847cafa84a8c2dca9bdaad5e7b3bc5712ab5ae37149aebe7c | Python | 47,089 | 1,199 | """In-process run orchestrator.
Turns a persisted `Run` row (status=queued) into an actual engine invocation:
- Marks the row `running`, then executes the requested plan in a thread-pool
worker.
- Attaches a `DBEventLogger` so every engine `Event` becomes an `events` row
and also fans out to any WebSocket subscri... |
8ef217bb482fe1aabbce83f71512da7d8ba68cd68b2cf4b516728e9bba631d84 | Python | 47,172 | 1,002 | import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
from scipy import stats
import scipy.signal as sgn
import os
import seaborn as sn
import mne
import Funciones
import librosa
from statannot import add_stat_annotation
from scipy.stats import wilcoxon
def highlight_... |
a1aae8270bd013e29d8a37cb2dd707b66c954d92deb649de8f725b2e8441e16b | Python | 47,277 | 1,102 | # 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... |
ac383c29aef8392f18116211558671d6c578f660831dd40612968eab4ec8fc48 | Python | 47,286 | 877 | # MIT License
#
# Copyright (c) 2024 EPFL Biorobotics Laboratory (BioRob).
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... |
9a7d5668c619758cc24837d10c4757178b6811743b23a551c6e3c165f09b9127 | Python | 47,296 | 1,397 | import calendar
import datetime
import decimal
import json
import locale
import math
import re
import sys
import time
import tracemalloc
from typing import Any
import weakref
import dateutil
import numpy as np
import pytest
import pandas._libs._ujson as ujson
from pandas.compat import IS64
import pandas as pd
import... |
5f8dcbdee055e46659e6f421bc5565965384d1aa75f91e169d053e108c9d4bfd | Python | 47,335 | 1,093 | from rl_games.common import object_factory
from rl_games.algos_torch import layers, torch_ext
import torch
import torch.nn as nn
from rl_games.algos_torch.d2rl import D2RLNet
from rl_games.algos_torch.sac_helper import SquashedNormal
from rl_games.common.layers.recurrent import GRUWithDones, LSTMWithDones
from rl_gam... |
a26a4e7e6cc1f585410fc57a333b0b4b2310f66079a900f77dbb612f6d2d72f3 | Python | 47,430 | 1,025 | import os
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import solve_ivp
from numpy.random import MT19937, RandomState, SeedSequence
from abc import abstractmethod, ABC
from time import time_ns
from functools import reduce
from msmfcode.core.config import *
from msmfcode.cor... |
8713fb8312484e1f5a32ba677efc2abbb6200433eb7c5a517d20ba4fa64ae96f | Python | 47,456 | 1,182 | # Copyright 2023 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... |
df9d360810c4aeec90c9bf7ab340ec5c98f3b145c9b51703f92c48709afa75a1 | Python | 47,516 | 1,475 | from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
Concatenate,
Literal,
Self,
final,
overload,
)
from pandas.util._decorators import set_module
from pandas.core.indexers.objects import (
BaseIndexer,
ExpandingIndexer,
GroupByIndexer,
)
from pandas.cor... |
bc46541f341c10de449ac9fbf8c74b0e3c941bc423eceff84ab3c6a485ea5475 | Python | 47,540 | 1,475 | from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
Concatenate,
Literal,
Self,
final,
overload,
)
from pandas.util._decorators import set_module
from pandas.core.indexers.objects import (
BaseIndexer,
ExpandingIndexer,
GroupByIndexer,
)
from pandas.cor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.