sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
07155fcbb98d2c20e01ca9e7c5ef482fb0fa116b5d77ceb87df61e36e53392ae | Python | 16,960 | 368 | """Cohort preprocessing for the tAge transcriptomic clocks (Tyshkovskiy 2026).
The tAge models live in mouse Entrez gene space, so expression from any of the
four supported species has to be translated before anything else happens.
``_map_to_mouse_entrez`` mirrors ``map_genes`` in the reference package's
``R/genes.R``... |
72341d5b2516a89ba69a38b5703e9fd98a79b349a56d3746913e87d85e987e56 | Python | 16,964 | 494 | from __future__ import annotations
import operator
import numpy as np
import pytest
from pandas.errors import (
Pandas4Warning,
)
from pandas.core.dtypes.dtypes import (
ArrowDtype,
)
import pandas as pd
import pandas._testing as tm
pa = pytest.importorskip("pyarrow")
# GH#62423; matched instead of the ... |
2f3bd8dba9c8271adb53ea325337fd5e550f1eee20b0830792ccf0487b182257 | Python | 16,966 | 434 | # 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... |
d6843ff744a31a249ae1f1cca5b389e7128b6aa3ea5c9cc04724be338361bbb8 | Python | 16,977 | 465 | # 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... |
3daba772defff05a5e5f1075ebe99cbe58db5aefbb6372315312c97dfa5730ed | Python | 16,990 | 668 | import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.api.indexers import BaseIndexer
@pytest.fixture(
params=[
"triang",
"blackman",
"hamming",
"bartlett",
"bohman",
"blackmanharris",
"nuttall",
"barthann",
... |
330b0514b244968a2c664153c85621ff872436e180b7bd2910fecbe0751fa50b | Python | 17,024 | 335 | import numpy as np
import cv2
import math
import os
import matplotlib.pyplot as plt
from tkinter import Tk
from tkinter import filedialog as fd
from PIL import Image
from scipy.sparse import lil_matrix as sparse
from scipy.special import lambertw
class RetinalCompression:
def __init__(self):
... |
9b0cf9b6323ca932d0ef97c996170d7ce60b9c377cab6451cb856d23bbd260e3 | Python | 17,042 | 482 | # -*- coding: utf-8 -*-
""" Utility functions for the Sequential Monte Carlo algorithms."""
# Authors: Gianvittorio Luria <luria@dima.unige.it>
# Sara Sommariva <sommariva@dima.unige.it>
# Alberto Sorrentino <sorrentino@dima.unige.it>
#
# License: BSD (3-clause)
import numpy as np
import scipy.specia... |
b65c0d0a3e18c1e6778dece05c8db3b855e286fef2273d76f8e8e427c7e1501c | Python | 17,044 | 394 | import datetime as dt
import os
from typing import FrozenSet, List, Optional
import ngs_tools as ngs
import pandas as pd
from typing_extensions import Literal
from . import config, constants, preprocessing, utils
from .logging import logger
from .stats import Stats
@logger.namespaced('count')
def count(
bam_pat... |
0ddd6ee4c818b85273010c307a80a0baae04e715ca8ab3dab2d0ca7b28b216cd | Python | 17,050 | 433 | #!/usr/bin/env python
"""Module Description: Test the ReadAlignment class in
MACS3.Signal.ReadAlignment, which holds one BAM alignment (CIGAR, packed
sequence, base qualities and MD tag) for callvar.
Reads are built the way BAMaccessor builds them: the sequence packed
4 bits per base in BAM order "=ACMGRSVTWYHKDBN", ... |
82bb074f20fab785c9ba662a9b0e22dba3da6e4e94f618dcc74858ee3651dff5 | Python | 17,065 | 503 | import os
import random
import pysam
class CSV:
def __init__(self, id, included_SSVs):
self.id = id
self.ref_chrom = included_SSVs[0].ref_chrom
self.ref_start = min([ssv.ref_start for ssv in included_SSVs])
self.ref_end = max([ssv.ref_end for ssv in included_SSVs])
self... |
b8ec07d731be876e6ec447f44ccd71826829a8660fa8f6896613a105ca8506c0 | Python | 17,067 | 479 | """Session 25 — trial-level artifacts, downloads, and per-candidate promote.
Promotes ``compare_models`` from "best wins, rest discarded" to a pool of
candidates. After this slice every trial keeps its fitted Pipeline pickle
+ extracted estimator hyperparams so the UI can:
- list every candidate (already shipped in s... |
27d67ee0df3a8a6c79b335c08fb9ac3e028c7a4be019c629490184d6c7527415 | Python | 17,079 | 358 | # ----------------------------------------------------------------------------
# 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.
# ------------------------------------------------... |
4596e2ca5dd1d2f1570b1a80f79ca38163cd59476fce188b47d6be506a09d353 | Python | 17,079 | 550 | import os
import csv
from pubchempy import *
import numpy as np
import numbers
import h5py
import math
import pandas as pd
import json,pickle
from collections import OrderedDict
from rdkit import Chem
from rdkit.Chem import MolFromSmiles
import networkx as nx
from utils import *
import random
import pickle
import sys
i... |
9db84c9e75ffff595aab8bf25d2c6692cfaccbbe8dd9dabbebc3ec17b0495ca6 | Python | 17,089 | 536 | from __future__ import annotations
import functools
import re
import textwrap
from typing import (
TYPE_CHECKING,
Literal,
cast,
)
import unicodedata
import numpy as np
from pandas._libs import lib
import pandas._libs.missing as libmissing
import pandas._libs.ops as libops
from pandas.util._validators im... |
c6aaf3929f2cc77cd12a37e3f4c8260e3ffd0892efe875e1cd31746cc8af299e | Python | 17,090 | 489 | from copy import (
copy,
deepcopy,
)
import numpy as np
import pytest
from pandas.core.dtypes.common import is_scalar
import pandas as pd
import pandas._testing as tm
# ----------------------------------------------------------------------
# Generic types test cases
def construct(box, shape, value=None, d... |
86cdaeac1a9f063a9009bf9ac2c8362a4edad7375a1a02d5dcdd637f47d06268 | Python | 17,092 | 286 | # Created on Monday November 12 14:23:00 2022
# @author: Andres
# Takes morphometric dataset, trains models to fit to given
# sample values, and validates the regression on the data set
# aside.
import os
from pathlib import Path
from tqdm import tqdm
import numpy as np
import zarr
import dill
from sklearn.pipelin... |
e3e0ba540a92cbb166458dac4f210bdc2cc118ebe8c87b17c7e2c0fbd85b40af | Python | 17,095 | 396 | # Copyright 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 agre... |
69c355a738c0c80784005f0e137408fe41b99dbb70f5b586771338dc51f6b638 | Python | 17,101 | 475 | # 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... |
12082060db4d2a25157fcce0dbfd6cb9816dd9ed540c0d6ca726b344fcb0ad2e | Python | 17,111 | 409 | """Methods for diagnosing problems in meta-analytic datasets or analyses."""
import copy
import logging
import nibabel as nib
import numpy as np
import pandas as pd
from joblib import Parallel, delayed
from nibabel.funcs import squeeze_image
from nilearn import image, input_data
from scipy import ndimage
from scipy.sp... |
c1672f64114992d3eb87c0432c90a8dd726570017c009e58b40b141b58c5f264 | Python | 17,116 | 492 | import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
import pandas._testing as tm
class TestDataFrameInterpolate:
def test_interpolate_complex(self):
# GH#53635
ser = pd.Series([complex("1+1j"), float("nan"), complex("2+2j")])
assert ser.dtype.ki... |
1053df9f8da72fbd532869b7ab6a42a43d426b0f3b7e54cc47dc6826ae24d7e6 | Python | 17,124 | 427 | #! /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... |
ee944ab527dc288b6970b66fbf93bcbde2b1888e0b71bb31b0d74810932730d0 | Python | 17,140 | 534 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import seaborn as sns
from fmriprep_denoise.features import get_atlas_pairwise_distance
from fmriprep_denoise.visualization import utils
def plot_motion_resid(
dataset,
fmriprep_version,
path_ro... |
496bfd981b6db408b885edd0e5045d146c89e5bb989def1e4f02541bfadaca8b | Python | 17,142 | 411 | # 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... |
b64445cfdbe2b878a413d152753e7518b5673e8a9e141bec0f191d1a1369ce6f | Python | 17,152 | 539 | from __future__ import annotations
import functools
import re
import textwrap
from typing import (
TYPE_CHECKING,
Any,
Literal,
cast,
)
import unicodedata
import numpy as np
from pandas._libs import lib
import pandas._libs.missing as libmissing
import pandas._libs.ops as libops
from pandas.util._vali... |
3e29d2c4fa0d25598d8dbd11f00b3cde0a74216d03df016940a13d295a82f274 | Python | 17,158 | 470 | """Utilities for coordinate-based meta-analysis estimators."""
import logging
import os
import nibabel as nib
import numpy as np
import numpy.linalg as npl
from scipy import ndimage
from .. import references
from ..due import due
from ..extract import download_peaks2maps_model
from ..utils import _determine_chunk_siz... |
0b6704f1f9cf947acb0d9656181be1585d2617e7336d5e67c6fbe05fadde2e1e | Python | 17,161 | 457 | import matplotlib.pyplot as plt
from matplotlib_venn import venn3
import numpy as np
import pandas as pd
import seaborn as sns
from ._cohens_d import gene_selection
from ._data_loader import SuematsuData
from ._go import gprofiler, get_go
from ._preference import (
kwarg_savefig, venn3_palette_alias,
sgoa_pipel... |
96fc98a768eb931b93a6c12b2265e1f496965a86a58c203e43908fbda3140039 | Python | 17,171 | 492 | # 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... |
765adea129292356e8018964848fa57866c6d30122a13d5b1cde976476e4c3e2 | Python | 17,187 | 377 | import numpy as np, matplotlib.pyplot as plt, sys
import pumpprobe as pp, wormdatamodel as wormdm
from scipy.optimize import curve_fit
from multipy import fdr
ds_list = "/projects/LEIFER/francesco/funatlas_list.txt"
ds_tags = None
ds_exclude_tags = "mutant"
inclall_occ = "--inclall-occ" in sys.argv
signal_range = Non... |
005cac10541d98a200e7c0aece4c3a5d176e357fd10bb3a9f53cd3c0b9ec2639 | Python | 17,192 | 453 | from datetime import timedelta
import numpy as np
import pytest
from pandas.core.dtypes.common import is_integer
import pandas as pd
import pandas._testing as tm
from pandas.tseries.offsets import Day
@pytest.fixture(params=[None, "foo"])
def name(request):
return request.param
class TestIntervalRange:
... |
93f87c7783dbeb0529aefbc7a1d1713ef29f64ffb458a72fc32952c86878226a | Python | 17,197 | 333 | # -*- coding: utf-8 -*-
"""
Created on Sept 2019
@author: Alice Geminiani - alice.geminiani@unipv.it
olivocerebellar spiking neural network with E-GLIF neurons and PLASTICITY, for classical eyeblink conditioning simulations
Publication: Geminiani et al., biorXiv, 2022 - doi: https://doi.org/10.1101/2023.06.20.54... |
d0d0276be1fa14d3ebbe64e99fbe1fdbe6305ba0dbf1dc54b73dd3f0464b7704 | Python | 17,199 | 566 | # -*- coding: utf-8 -*-
"""uniqueEuclidean.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1inEhNa0J7XYmffno1eVaux77r_NC-CcY
"""
# Commented out IPython magic to ensure Python compatibility.
from google.colab import drive
drive.mount('/content/dr... |
df13d773c2cad431aea24862efab8b032510a343dc000d617b20f1fed8a67f47 | Python | 17,218 | 474 | # 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... |
56009898b90f95ab8b1d61082c891263e7a84680cddcf46579ad9c93cca12467 | Python | 17,219 | 522 | from __future__ import print_function
import sys
import os
import re
import math
import pickle
import numpy as np
import pandas as pd
from scipy import linalg, special
file_re = re.compile('output_([^_]+)_f(\d+)_([^_]+).csv')
def stderr(s):
sys.stderr.write(s)
sys.stderr.flush()
def extract_cdr_prediction_... |
ca828696579a4d2b2a195ff9a6abffab76a44c13df9213c01827833de134642b | Python | 17,220 | 428 | from datetime import (
timedelta,
timezone,
)
import re
import zoneinfo
import dateutil.tz
from dateutil.tz import gettz
import numpy as np
import pytest
from pandas._libs.tslibs.dtypes import NpyDatetimeUnit
from pandas.compat import WASM
from pandas.errors import OutOfBoundsDatetime
import pandas.util._test... |
aea15d96b3cc07738a7378ad5484d8b49319f9ce0ab2994b8cadf6d15703e76c | Python | 17,249 | 438 | import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
class TestCategoricalOpsWithFactor:
def test_categories_none_comparisons(self):
factor = pd.Categorical(["a", "b", "b", "a", "a", "c", "c", "c"], ordered=True)
tm.assert_categorical_equal(factor, factor)
def te... |
3f8c9aba453194875db45eeb9317c39aa66bdf07218f3f266b616f1a6cf09eb8 | Python | 17,255 | 411 | import numpy as np
import pytest
from pandas._libs.sparse import IntIndex
from pandas.errors import IntCastingNaNError
import pandas as pd
import pandas._testing as tm
from pandas.core.arrays.sparse import SparseArray
class TestAstype:
def test_astype(self):
# float -> float
arr = SparseArray([N... |
7a7daeeda33a551563bfd9b99714b7680d0ac84017ef70cc5c8bb7aa1a03f165 | Python | 17,255 | 490 | import os
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.lines as mlines
import numpy as np
import seaborn as sns
from sklearn.preprocessing import StandardScaler
from pingouin import partial_corr
import networkx as nx
import networkx.algorithms.community as nx_comm
from itertools import permutat... |
4c8a67de633e9b1b71a667a49892dc818188fbb21fc8bf39a8842f8dd86886d1 | Python | 17,274 | 597 | """
Functions for structure prediction using CNSsolve 1.21
Authors:
Thomas A. Hopf
"""
import os
from os import path
import pandas as pd
from pkg_resources import resource_filename
from evcouplings.fold.restraints import (
ec_dist_restraints, secstruct_dist_restraints, secstruct_angle_restraints
)
from evcoupl... |
e239e39d1e94f5ca09db7f80e2180af4f7c16304e40d5181aa1fd4f36977acdb | Python | 17,278 | 377 | import numpy as np, matplotlib.pyplot as plt, sys
import pumpprobe as pp, wormdatamodel as wormdm
from scipy.optimize import curve_fit
from multipy import fdr
ds_list = "/projects/LEIFER/francesco/funatlas_list.txt"
ds_tags = None
ds_exclude_tags = "mutant"
inclall_occ = "--inclall-occ" in sys.argv
signal_range = Non... |
c6a83ac558f8af923d770514227e31a41d3994af92e51b610d236507b814a2d7 | Python | 17,281 | 522 | from datetime import (
datetime,
timedelta,
)
from io import StringIO
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
class TestDataFrameRepr:
def test_repr_should_return_str(self):
# https://docs.python.org/3/reference/... |
87ca18ea36d40580f271a2e7e9df741119e9b1c7b02cd8d806bc916c02ca604b | Python | 17,288 | 512 | ''' This program will update the janelia-neuronbridge-publishing-doi table on
DynamoDB. Data is pulled from the Split-GAL4 and Gen1MCFO prod databases
and NeuronBridge MongoDB. For EM data, Body IDs (in the form
dataset:version:bodyid) are written. For LM data, publishing names are
written.
Note tha... |
ef1743f307e0062a12643779de3fe1c1e5ae7950fc492a0a5238b4f7ff35d06c | Python | 17,297 | 425 | # 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... |
a619497ecde92f8f061f883ccfbba999fa69844cc1d8f62f2234b542d1a7af22 | Python | 17,302 | 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... |
d5ef2e3c106b2c1ffa8031f92b8a983b407d33416e5ea0329ad3becf1497f632 | Python | 17,318 | 597 | """
Pipelining of different stages of method
Authors:
Thomas A. Hopf
"""
# chose backend for command-line usage
import matplotlib
matplotlib.use("Agg")
from copy import deepcopy
import signal
import os
from os import path
import sys
import traceback
import tarfile
import zipfile
import click
from evcouplings.uti... |
18fd95246baa63f124bca6df7a2d6975c06ed0a283d7e6dfbae5e019af617ccb | Python | 17,319 | 465 | __version__ = "2.0"
__author__ = "Singh, Satnam"
__maintainer__ = "Singh, Satnam"
__contact__ = "satnam.singh@ivv.fraunhofer.de"
from custom_loader import CubeECHADataset
import optuna
import torch.optim as optim
import json
from tqdm import tqdm
import random
from datetime import datetime
from unet3d import *
from lo... |
532a91aae4b6198c25d661dfd83f63138d4f4786de1f77eb2dba82a0565cd78e | Python | 17,340 | 572 | from typing import Optional, Dict
import torch
import torch.nn as nn
import torch.nn.functional as F
from ..svr.reconstruction import cg
from ..transform import (
RigidTransform,
mat_update_resolution,
ax_update_resolution,
mat2axisangle,
point2mat,
mat2point,
)
from .attention import Transforme... |
8fbddacef26d5bcd38b1a5b719bc411ddaf7fc7cde06135a293b0c58b8ebb51e | Python | 17,342 | 430 | # 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... |
181ceca8594c0ffe36f72303160d313e99f0df22b3ec35a8bdb3b1a5bd088bff | Python | 17,343 | 439 | # 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... |
69f3f05a620b97ed50cc3bd97f55e30de89f96ee499e10b2b89d3272fa2e8333 | Python | 17,343 | 449 | """Tests for grid sampling operator."""
import contextlib
from typing import Any, Literal
import pytest
import torch
from mrpro.data import SpatialDimension
from mrpro.operators import GridSamplingOp
from mrpro.utils import RandomGenerator
from torch.autograd.gradcheck import gradcheck
from tests import dotproduct_a... |
cbc8617b3ebfaa4338bb9bcaef405351dd1e22ca45d00949624dc2e89f46f0d4 | Python | 17,343 | 297 | #!/usr/bin/env python2.7
import os
from collections import defaultdict
###################################### USAGE ######################################
### Steps
# 1: download GTF file (e.g. "Mus_musculus.GRCm38.90.gtf" )
# 2; put file in current working directory
# 3: run this script
# 4: use the output (e.g. ... |
6a9b4ec1b1406d386b31e6178db3ed079bb00ed446bae66babd390940f2457eb | Python | 17,344 | 536 | # 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... |
22b8edb9e28f49dfffb2b2fc2d6cd1fe81343e7e46d5a332c037f796d2941a61 | Python | 17,354 | 479 | # 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... |
2bb826885cffb9dc0700f9c1626361e8e78ef43414171b33cdbc93482a066824 | Python | 17,355 | 585 | """
Low-dependency indexing utilities.
"""
from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
)
import numpy as np
from pandas._libs import lib
from pandas.util._decorators import set_module
from pandas.core.dtypes.common import (
is_array_like_deprecate_non_pandas,
is_bool... |
d6cd9949442ab2c4c552acd51ec2fefb658f8a78eaa224f950378235a107541f | Python | 17,355 | 500 | """
Top level ``eval`` module.
"""
from __future__ import annotations
import tokenize
from typing import (
TYPE_CHECKING,
Any,
)
import warnings
from pandas._config.config import _global_config as config
from pandas._libs import lib
from pandas.errors import Pandas4Warning
from pandas.util._decorators impor... |
4503047935bb8fed46de02b2fe6e59d7a188e44e2fe4fe9c734bc9ce930187bd | Python | 17,362 | 417 | """Live viewer for trained rl_games policies on mjlab tasks.
Watch a checkpoint drive any registered mjlab task in real time::
python -m rl_games.envs.mjlab_play \
--file rl_games/configs/mjlab/ppo_go1_velocity.yaml \
--checkpoint runs/MJLab_Go1_Velocity/nn/MJLab_Go1_Velocity.pth
Uses mjlab's own... |
2e6718341297c02be59b8d09fb2fc604def0d3c0b759b510275147c6ddf7dc03 | Python | 17,364 | 411 | # 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... |
75f98e98a537f3fc3568fc9ca302f46683fa84d27066fc738ca1cd754cd4077c | Python | 17,367 | 449 | """Kernel transformers for CBMA algorithms.
Methods for estimating thresholded cluster maps from neuroimaging contrasts
(Contrasts) from sets of foci and optional additional information (e.g., sample
size and test statistic values).
"""
from __future__ import division
import logging
import os
import warnings
from has... |
84593dc313aa5b53f9d36862e64e8bcb8a86205811a2cb3a930f6ab36d6114a8 | Python | 17,378 | 638 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Model definitions for timeseries prediction + architecture manipulation utils
Created on Fri Aug 14 18:24:45 2020
@author: jeanbaptiste
"""
from tensorflow.keras.models import Model
from tensorflow.keras.layers import (
Layer, Dense, LSTM, Input, TimeDistributed,... |
21c5ab89646326e993a784087619ea6caf582a5f355a7b460cb77c211b82fdb7 | Python | 17,380 | 553 | from datetime import datetime
import re
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
@pytest.mark.parametrize("subset", ["a", ["a"], ["a", "B"]])
def test_drop_duplicates_with_misspelled_column_name(subset):
# GH 19730
df = pd.Da... |
bfe8445dc298222dc86049c401ee72ecf29387181091f7911bf60de5522bbede | Python | 17,382 | 492 | # 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... |
66d97ab709709cc7a28fc7e5a756e116be578bfecb47334136e96697b933145e | Python | 17,388 | 439 | # 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... |
5c09a65a1a7a1daef086b118acda7face691989410bcf28e4ebcc754db6d5c84 | Python | 17,394 | 407 | # 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... |
a403a77adff157ad799ff9c6936e7053a1c6b1af7a52544a11866ec8a751a9ce | Python | 17,397 | 551 | #
# File to train networks built from the hnn.py class.
#
# This file establishes the clebsch gordan coefficients, sets up an hnn with
# given parameters, loads holograms from .npy files, and then tests the network
# via a function call.
#
from argparse import ArgumentParser
import atexit
import math
import logging
i... |
c9a1943fcde9bd6b6d5e26a3e937c9a41e0558a5614905945d30e021f9a6a9d6 | Python | 17,397 | 531 | # 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... |
f3d357bff5a2e0da33f98bfb371e0499d124bfce58fe7203bf1becb3bd0e1c0f | Python | 17,415 | 501 | #!env /usr/bin/python
# -*- coding: utf-8 -*-
# JN 2016-01-12 ncs data viewer
from __future__ import division, print_function, absolute_import
import sys
import os
from glob import glob
from time import time
from collections import defaultdict
# import datetime
import numpy as np
from PyQt5.QtCore import Qt
from PyQt... |
d93988a0e3e0c1f31cd1bf4b5f3496c293d57fbd763d719afdc5e23f1c90ca49 | Python | 17,416 | 468 | import argparse
import copy
import h5py
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
import os
import re
from scipy.interpolate import LinearNDInterpolator, interp1d
from scipy import ndimage
from scipy.ndimage.filters import uniform_filter
import torch
import pyproj
import windseer.me... |
321f243d4d7ced8c2fcbfe682d09d869e2236e3e214235f8cab60df6f0035058 | Python | 17,424 | 546 | # 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... |
3d2376de689c3404faaf6fcd270daf52753f618cf13bc933accf73da917142c9 | Python | 17,425 | 467 | #!/usr/bin/env python3
# versions
import platform
import yaml
import os
os.environ["MPLCONFIGDIR"] = "./tmp/mpl"
os.environ["NUMBA_CACHE_DIR"] = "./tmp/numba"
import pandas as pd
import scanpy as sc
import numpy as np
import pegasusio as io
from pathlib import Path
from typing import Tuple, List
class Arguments:... |
00fc4c011c0c1509f883be2d522ae9d0641fe096963615c0da81adb1fbdca3e3 | Python | 17,426 | 506 | # TODO: Use the fact that axis can have units to simplify the process
from __future__ import annotations
import functools
from typing import (
TYPE_CHECKING,
Any,
)
import numpy as np
from pandas._libs.tslibs import (
BaseOffset,
Period,
to_offset,
)
from pandas._libs.tslibs.dtypes import (
... |
a169f69cfa90529010b87864d376e63c4f528012431e11d46e36c0f810302cdf | Python | 17,432 | 574 | """
:mod:`pandas.io.formats.xml` is a module for formatting data in XML.
"""
from __future__ import annotations
import codecs
import io
from typing import (
TYPE_CHECKING,
Any,
final,
)
import warnings
from pandas.errors import (
AbstractMethodError,
Pandas4Warning,
)
from pandas.util._decorators... |
4d5704bf2b95f300584e99d341dd0ec458072992ea07931882c837a73d36204e | Python | 17,434 | 573 | """
:mod:`pandas.io.formats.xml` is a module for formatting data in XML.
"""
from __future__ import annotations
import codecs
import io
from typing import (
TYPE_CHECKING,
Any,
final,
)
from pandas.errors import AbstractMethodError
from pandas.util._decorators import cache_readonly
from pandas.core.dtyp... |
641a24a6fb3b0a3393eb734d26e01e1b5d64b7ac661fd57e8b716cf4ebd6bdab | Python | 17,460 | 514 | ######################
### Import Library ###
######################
# My library
from molgraph.dataset import *
from molgraph.molgraph import *
from molgraph.utilsmol import *
from molgraph.utilsgraph import *
# general
import os as os
import numpy as np
import random as random
import copy as copy
# scikit scipy
fr... |
63b50487dcb330c9be4a9415ed7d24b0388c65a99ccfaa4972ba61d8db3c2beb | Python | 17,465 | 459 | from copy import deepcopy
from typing import Any
import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
class TestIndexConcat:
def test_concat_ignore_index(self, sort):
frame1 = pd.DataFrame(
{"test1": ["a", "b", "c"], "test2": [1, 2, 3], "test3": [4.5, 3.2, 1.2]}
... |
9b231aa27bb9cac0fac5f271584cfbe033912d090aeca43315549b202f4c614c | Python | 17,466 | 457 | from functools import wraps
from inspect import signature
from pathlib import Path
from pprint import pformat
from urllib.parse import unquote, urlsplit
from urllib.request import urlretrieve
import torch
from rich.columns import Columns
from rich.table import Table
from rich.text import Text
from ..logger._live impo... |
d3bf372928a83d61fd80d8f8332029fd6b6ce0d7aa251ebcbfac646d8614fd4a | Python | 17,473 | 516 | import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.tests.copy_view.util import get_array
@pytest.mark.parametrize(
"replace_kwargs",
[
{"to_replace": {"a": 1, "b": 4}, "value": -1},
# Test CoW splits blocks to avoid copying unchanged columns
... |
c74205e80ec31582864ca50ba21d1e3ce44d71a721107f293d742a2069c6b642 | Python | 17,490 | 337 | # SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of sourc... |
a24b19338b78f7fb7bbd936c10a7d05222ff2313ad27f0e1a4d50cb1bb3cf2d4 | Python | 17,493 | 429 | from datetime import (
datetime,
timedelta,
timezone,
)
import dateutil.tz
from dateutil.tz import gettz
import numpy as np
import pytest
from pandas._libs.tslibs import (
iNaT,
timezones,
)
from pandas.compat import WASM
from pandas.errors import OutOfBoundsDatetime
import pandas.util._test_decor... |
0d6670b4d932b954a45b74fa40aab081f9b07dd6a05abe9e209492cafa525915 | Python | 17,500 | 432 | import sys
import os
import shutil
from itertools import chain, combinations
if sys.version_info[0] == 2:
import ConfigParser as configparser
else:
import configparser
from .formula import Formula
from .kwargs import MODEL_INITIALIZATION_KWARGS, BAYES_KWARGS, NN_BAYES_KWARGS, \
PLOT_KWARGS_CORE, PLOT_KWARG... |
655e45990d22eb4370e28526523a1e4999ecb244af0172e1d8a3023124cd41a7 | Python | 17,508 | 686 | # coding: utf-8
# TODO
# test with the --output option
# test reading from standard input
from io import StringIO
import os
from pytest import raises
import sys
from atropos.commands import execute_cli, get_command
from unittest import skipIf
from .utils import (
run,
files_equal,
datapath,
cutpath,
... |
d6642084b7342cb6740630a89c6ec42bf5df3edd01768765094ece59d1f3857a | Python | 17,508 | 470 | from __future__ import print_function, division
import csv
import functools
import json
import os
import random
import warnings
import pickle
from pathlib import Path
import numpy as np
import torch
from pymatgen.core.structure import Structure
from torch.utils.data import Dataset, DataLoader
from torch.utils.data.da... |
b87af82516144549bb78440350f968a340bfeda2a3f14d0e92a89512538072c0 | Python | 17,515 | 498 | from datetime import (
datetime,
timedelta,
)
import numpy as np
import pytest
from pandas._libs.algos import (
Infinity,
NegInfinity,
)
import pandas as pd
import pandas._testing as tm
class TestRank:
s = pd.Series([1, 3, 4, 2, np.nan, 2, 1, 5, np.nan, 3])
df = pd.DataFrame({"A": s, "B": s... |
d11c6825b7f0292fe0101679e127318f26b34d795befa714e1b06347279a4e56 | Python | 17,520 | 414 | import numpy as np, matplotlib.pyplot as plt, sys, re, os
import pumpprobe as pp, wormdatamodel as wormdm, wormbrain as wormb
from scipy.signal import savgol_coeffs
from scipy.stats import combine_pvalues
plt.rc('xtick',labelsize=18)
plt.rc('ytick',labelsize=18)
# List of datasets
fname = "/projects/LEIFER/francesco/f... |
44fd9bad264982533e7a6e4636a29603f72fe64cf346a4def044c04d4abc1576 | Python | 17,523 | 445 | # 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... |
420c2be0daf55a6943cce3197be4078189db3eb088fd82e4852cb8445b36e8cc | Python | 17,526 | 481 | # 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... |
9095dbdd56e0e6f938ace0459a52d3c57736419c40ae74cb5d371eb4e9d713c2 | Python | 17,530 | 585 | from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
Literal,
final,
)
import numpy as np
from pandas.core.dtypes.common import (
is_integer,
is_list_like,
)
from pandas.core.dtypes.dtypes import DatetimeTZDtype
from pandas.core.dtypes.generic import (
ABCDataFrame,... |
be19f2bb165c645efab8603a14ba29e16f938b526b2b5bf9a05d20b48cef5af7 | Python | 17,530 | 534 | import operator
import re
import numpy as np
import pytest
from pandas.compat._optional import import_optional_dependency
import pandas as pd
import pandas._testing as tm
from pandas.core.api import DataFrame
from pandas.core.computation import expressions as expr
from pandas.util.version import Version
@pytest.fi... |
892519b11b18b7d08b67b0136dacad6541b178ff8dc7d74661116d26148e6ebf | Python | 17,557 | 573 | # -*- coding: utf-8 -*-
# @File name: superpos_functions.py
# @Author: Alicia Garrido-Peña
# @Date: 2023-08-18 14:10:04
# @Contact: alicia.garrido@uam.es
# "Copyright (c) 2023 Alicia Garrido-Peña. All Rights Reserved."
# Use of this source code is govern by GPL-3.0 license that
# can be found in the LICENSE file
#... |
63e7a06b3e74f4b24bc01a0e901af8b3e613ad8110b6004145a1bb857220329f | Python | 17,558 | 530 | import numpy as np
from esFCM.utils import neighborhood_conv, rescale_between_a_b, create_window_3D, ssim3D, BiasCorrection
from sklearn.preprocessing import PolynomialFeatures
from scipy.special import softmax
from skimage.metrics import structural_similarity as ssim
from scipy.ndimage import sobel
import abc
def c... |
903904544a01fb1fe97b3b3342ddf2eea06b57f973999c62a21a5f30549a00a2 | Python | 17,560 | 429 | from pathlib import Path
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
def plot_history(out, history, metric='loss', title=None, width=8, height=6):
title = title or 'model {}'.format(metric)
val_metric = 'val_{}'.format(metric)
plt.figure(figsize=(width, heigh... |
996707024310831d85b163832cbc5a803c3216d5c8a404d10ad80135139ad0e5 | Python | 17,561 | 525 | # 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... |
e3143a0f074b29ddb14c1c9e963031143138d4508404e2b0a51e43daed6feea4 | Python | 17,565 | 479 | # 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... |
56cc53ff9a65886ece1fda16d1fa4f1505afe6caec1c5d604d636267dc1d3b2d | Python | 17,570 | 363 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Refinement entry point for the BASALT pipeline (CheckM-based branch).
This module performs dereplication, DL-based outlier removal, contig
retrieval, and optional polishing to refine the quality of MAGs.
"""
import time
import sys
import os
from Bio import SeqIO
from... |
d1325d9603e1b1f4fc8a58a4f20327a4d850fcdd8d7ac17e94395dc8137d1a19 | Python | 17,570 | 471 | from __future__ import annotations
from decimal import Decimal
import numpy as np
import pytest
from pandas._libs import lib
from pandas.core.dtypes.dtypes import (
ArrowDtype,
)
import pandas as pd
import pandas._testing as tm
from pandas.api.types import (
is_numeric_dtype,
)
pa = pytest.importorskip("p... |
792f83d6f29daa7f3e74313a28f85a446edf9b0ad3e33670661997e006a7ad56 | Python | 17,577 | 510 | # -*- coding: utf-8 -*-
"""
file collects widgets that call matplotlib
"""
from __future__ import print_function, division, absolute_import
import logging
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import numpy as np
from matplotlib.backends.backend_qt5agg import\
FigureCanvasQTAgg as FigureCanvas
logge... |
34dc3039369597c26d7e79ed82e7691a93c4ffa130d9ea3bc746864713c3497d | Python | 17,587 | 430 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 21 22:59:08 2023
@author: lonya
"""
#%% Load Data
import tkinter as tk
import tkinter.filedialog as fd
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import my_funcs as mf
import pickle
import seaborn as sns
#%% Load... |
a0478d31266cfbaf3b50fd9b6c8bf5dbf79ba74c6130c3ab7a78fb55d87cadc2 | Python | 17,597 | 560 | from datetime import datetime
import re
import numpy as np
import pytest
from pandas.errors import Pandas4Warning
import pandas as pd
import pandas._testing as tm
@pytest.mark.parametrize("subset", ["a", ["a"], ["a", "B"]])
def test_drop_duplicates_with_misspelled_column_name(subset):
# GH 19730
df = pd.Da... |
bb7126963b9f7341baad811200bdafb013778d21ac61f7c7af6443c9720effa8 | Python | 17,597 | 508 | # TODO: Use the fact that axis can have units to simplify the process
from __future__ import annotations
import functools
from typing import (
TYPE_CHECKING,
Any,
)
import numpy as np
from pandas._libs.tslibs import (
BaseOffset,
Period,
to_offset,
)
from pandas._libs.tslibs.dtypes import (
... |
bde5797050e57bd6a2a140bc36be39b1f3891e2843aa6761aea83b746c6cdcba | Python | 17,597 | 480 | # 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... |
dd246c7cdb83cbbc7c582dcbfba0a2dc4fd1829f06a72c66ef1f033abbd4d26d | Python | 17,608 | 512 | """
Copyright (c) 2014-2018 Alex Forencich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distr... |
c74083777eeb5a78a681edd14f376feb90c2d7cdf5e415b7c74098d1d817dd94 | Python | 17,611 | 578 | """
Module consolidating common testing functions for checking plotting.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
import numpy as np
from pandas.core.dtypes.api import is_list_like
import pandas as pd
import pandas._testing as tm
if TYPE_CHECKING:
from collections.abc import Seq... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.