sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
094a42d47db5fcee31b4002e26f84bb4fdd0a1cc02f9bd1de60ea3313f0cc930
Python
59,526
1,688
from __future__ import annotations from collections.abc import Callable from collections.abc import Container from collections.abc import Iterable from collections.abc import Mapping from collections.abc import Sequence import copy from numbers import Integral from numbers import Real import threading from typing impo...
7b997d2c876e97aab9ad290c65f8a834ab588b2f391276e526ad250eb2989f53
Python
59,609
2,077
# tifffile/tifffile_geodb.py """GeoTIFF GeoKey Database. Adapted from http://gis.ess.washington.edu/data/raster/drg/docs/geotiff.txt """ import enum class Proj(enum.IntEnum): """Projection Codes.""" Undefined = 0 User_Defined = 32767 Alabama_CS27_East = 10101 Alabama_CS27_West = 10102 Ala...
f1f901af9c8012d4d1f6fda01bbb27d71623faf5c4c36a2dd2d6c17fb6a65125
Python
59,623
1,397
"""Search space transformation and encoding/decoding classes""" from __future__ import absolute_import, division, print_function import numpy as np from numpy import array, isfinite, log import warnings as _warnings from .utilities.utils import rglen, print_warning, is_one, SolutionDict as _SolutionDict from .utiliti...
c1f49c8c930fd1dc5b50b3d3998c3aca794b97652a66758052f331cc8bf299d4
Python
59,837
1,307
import csv import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.metrics import roc_curve, auc from scipy import interp import pickle from scipy import stats from sklearn.metrics import roc_auc_score from itertools import cycle from itertools import * impo...
e009f56c6ac20b97ed00d65c9d2935939fdbbadebda25ed6e3455955fa967ce9
Python
60,464
1,449
# SPDX-License-Identifier: LGPL-3.0-or-later import contextlib import datetime import functools import logging import time from copy import ( deepcopy, ) from pathlib import ( Path, ) from typing import ( Any, ) import numpy as np import paddle import paddle.distributed as dist from paddle.distributed impo...
bc5129e62222ef5cecd59f2cb1cec7987b31a7bcd99ee133b8da908587c0dc1e
Python
60,615
1,303
# ---------------------------------------------------------------------------- # Copyright (c) 2017-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. # ------------------------------------------------...
a12468490fe79ed3f3e871d06757545799c9db8d234a116cb0bb9307dc100b01
Python
61,467
1,567
from __future__ import print_function import weakref import numpy as np import scipy.optimize from collections import OrderedDict import neuron from neuron import h from ..util import nstomho, mho2ns from ..util import custom_init from .. import synapses from .. import data from .. import morphology from .. import deco...
c8f8fe1b551c275c51e78fa54e0a4b4f85205c36311141faebd681d0d309d286
Python
61,975
1,086
""" Script to plot paper figure panels from main analysis file generated via rwave_build_main.py """ import argparse import os from os import path from typing import Any, List import h5py import numpy as np import matplotlib as mpl import matplotlib.pyplot as pl from matplotlib_venn import venn2 import seaborn as sns ...
951537f9402e6b200bcd2ed0d52e466927d341afd2bdf3a5be5c69c159cfa43c
Python
62,322
1,759
from __future__ import division from itertools import product from textwrap import dedent from distutils.version import LooseVersion import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from .external.six import string_types from . import utils from .utils import (categoric...
b589d5add050aa17ed7c933f5296d77e63c886d913d160787348e82a8834ceda
Python
62,551
1,585
import os import time import torch import numpy as np from os.path import join as pjoin from scipy.stats import pearsonr from functools import partial from PIL import Image from torch import nn from torch.utils.data import DataLoader from torchvision import transforms from torchvision import models as tv_models from d...
2d2ffccc9093572fd4a2a90c2d53124503631440a7753ba4fc8d6625fc03fd88
Python
62,642
1,962
# Copyright 2026 DeepMind Technologies Limited # # 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 agr...
b04fa2f539417dcc06b57fd657a2cf22223e71cec5595e745da1f75df707d50c
Python
62,699
1,208
import os import numpy as np import pickle as pkl import pandas as pd import src.models.kernel_regression as kernel_regression import src.visualization.vizregression as vizregression import src.data.process_ephys_data as pephys import src.data.analyse_spikes as anaspikes import sklearn.model_selection as sklselection ...
f27e197ee91c6479ad3e92251e8f57a6b77cc7dc35a1197f9951909cf3815ad7
Python
62,856
1,650
import abc import cv2 import time import copy import torch import numpy as np from os import remove from os.path import join as pjoin from PIL import Image from scipy.ndimage.filters import gaussian_filter from torch.optim import Adam import torch.nn as nn from torch.nn.functional import interpolate from matplotlib im...
898a9f63b21edd88738ea9ad8293d4e6d03f24edae24075cc8bf85a00b62ec96
Python
63,035
1,878
import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt import pytest import numpy.testing as npt from numpy.testing import assert_array_equal, assert_array_almost_equal import pandas.testing as tm from seaborn._base import categorical_order from seaborn import rcmod from seabo...
0e20db43a5b2511b60d9df6f9c6af17caf9bdea99efe32e75e49938cfbaa17ce
Python
63,165
1,861
from itertools import product import warnings import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.colors import same_color, to_rgba import pytest from numpy.testing import assert_array_equal, assert_array_almost_equal from seaborn.palettes import color_palette from seaborn._ba...
e8f23f6935324b0f57c983fc2bef5658ea96e29e098d1e5f0156a7ccea267b12
Python
63,316
1,556
# Copyright 2019-2021 The AmpliGraph Authors. All Rights Reserved. # # This file is Licensed under the Apache License, Version 2.0. # A copy of the Licence is available in LICENCE, or at: # # http://www.apache.org/licenses/LICENSE-2.0 # from collections.abc import Iterable from itertools import product, islice imp...
3e29f3243ce2f6b6b7c04ac5e94a4afe22928abe147d2e252dbd33c0e18fe5e9
Python
63,765
1,696
"""Machine type checkers for Series scitype. Exports checkers for Series scitype: check_dict: dict indexed by pairs of str 1st element = mtype - str 2nd element = scitype - str elements are checker/validation functions for mtype Function signature of all elements check_dict[(mtype, scitype)] Parameters --------...
37895010e1df33be2c4db15539761b5156ed1bba1bbc88d9e932d5e7b8350863
Python
63,862
2,051
# roifile.py # Copyright (c) 2020-2026, Christoph Gohlke # 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 li...
6b8ad4295ee7a523d563b1dbb4a644e2f1a2606771ebe01d1710a9849843200d
Python
64,101
91
## For Calculating Psilocybin Concentration in the ECS from numba import jit import numpy as np #import matplotlib.pyplot as plt from scipy import interpolate import time begin = time.time() h=0.01 # In minutes -- time step size g=0.01 # In Centimeter -- spatial step size print("h=",h) print("g=",g) #...
8b628375ef5c34a7e7dd2582450ce4e4fc0ba1821dd75fedabf3d0a8004df3f3
Python
64,638
1,062
from bert_serving.server.helper import get_args_parser from bert_serving.server import BertServer from bert_serving.server.helper import get_shutdown_parser import pandas as pd import os from tqdm import tqdm import re import pickle import sys import numpy as np from nltk.tokenize import RegexpTokenizer #...
cd361deb10e584f988945b382609ac133810c59d5326cd5ad7c7af2d392e3744
Python
65,092
1,386
import pdb import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import sciplotlib.style as splstyle import xarray as xr import pandas as pd import scipy.signal as ssignal import scipy.stats as sstats import sklearn as skl import src.data.process_facecam as pface import src.data.analyse_2p as ana...
9a29f2e388a17cf08f26eb9748354436c8392f5d0c3066755b3fceb6531b5574
Python
65,488
1,602
# Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import os import pathlib import shutil import uuid import warnings from typing import TYPE_CHECKING, Any import numpy as np import pytest import onnx from onnx import ( ModelProto, NodeProto, ...
50ae7733d2e5ad8d70401e5c1719df8ecc0eac0f44f16967ed337a46b0a3779f
Python
65,489
1,522
import matplotlib.pyplot as plt from matplotlib.colors import Normalize import numpy as np from ipywidgets import widgets from CGAL.CGAL_Polyhedron_3 import Polyhedron_3 from typing import List, Tuple, Dict, Set, Iterable, Callable from spine_fitter import SpineGrouping from spine_segmentation import point_2_list, list...
8a96509352c78b06420c27e5f97cc9900f8d9b655edf43aafc1906e98d35c648
Python
65,598
1,752
"""Utilities for loading datasets.""" __author__ = [ "mloning", "sajaysurya", "big-o", "SebasKoel", "Emiliathewolf", "TonyBagnall", "yairbeer", "patrickZIB", "aiwalter", "jasonlines", "achieveordie", "ciaran-g", "jonathanbechtel", ] __all__ = [ "load_airline", ...
269f35bd625a535033ae229b50dc318a27e15da82a51eaecb6f5fe8be6728e81
Python
65,918
1,764
from __future__ import annotations import warnings import itertools from copy import copy from collections import UserString from collections.abc import Iterable, Sequence, Mapping from numbers import Number from datetime import datetime import numpy as np import pandas as pd import matplotlib as mpl from seaborn._co...
f209b5441c841725b417bb24af50edfd428fdb9bab142b01f72418db9f0cb4c0
Python
66,038
1,586
from matplotlib import colors from seaborn._compat import register_colormap _rocket_lut = [ [ 0.01060815, 0.01808215, 0.10018654], [ 0.01428972, 0.02048237, 0.10374486], [ 0.01831941, 0.0229766 , 0.10738511], [ 0.02275049, 0.02554464, 0.11108639], [ 0.02759119, 0.02818316, 0.11483751], [ 0.032...
18c6adaa6e1d260851826cc116da42f0f125e22ee711b4b1525a5898f7deeb72
Python
66,065
1,189
import argparse import logging import math import os import random import time import traceback from collections import defaultdict from functools import partial from pathlib import Path from typing import Dict, List, Optional, Tuple, Union import numpy as np import pandas as pd import torch import torch.distributed a...
441b0fcbd77051239e3a9f725cefe0866540ab2c4068b275ee1aa15c7afb49cd
Python
68,231
1,824
"""The classes for specifying and compiling a declarative visualization.""" from __future__ import annotations import io import os import re import inspect import itertools import textwrap from contextlib import contextmanager from collections import abc from collections.abc import Callable, Generator, Mapping from ty...
82a08a51b443759b0b9ac8bff4ca45a1093f542c07496c268690013b761ca2ce
Python
68,238
1,947
from __future__ import annotations from collections.abc import Callable from concurrent.futures import as_completed from concurrent.futures import ProcessPoolExecutor from concurrent.futures import ThreadPoolExecutor import copy import multiprocessing import pickle import threading import time from typing import Any f...
2e84ea29943d30c6f9bfb96bb27bacbd6a8f96a421b67f8f7d7af41925c2847a
Python
68,318
1,648
import hashlib import logging import re import tempfile from collections import Counter from pathlib import Path from typing import Any, Optional, Union import numpy as np import torch from deprecated.sphinx import deprecated from sentencepiece import SentencePieceProcessor from torch import nn import flair from flai...
b90196d295ad6986dd97a5afc98f79254d1bacfd36ef25e299e94c18ae7d8f52
Python
68,696
1,568
#!/usr/bin/env python3 """ run neurondm related exports and conversions Usage: neurondm-build release [options] neurondm-build all [options] neurondm-build [indicators phenotypes] [options] neurondm-build [models bridge old dep dev] [options] neurondm-build [sheets] [options] Options: -h --help...
503dd6b1ad18ffec0ece888b3817198267579a1b152757af493ad6a47f20396e
Python
68,859
1,696
import logging import re from pathlib import Path from typing import Optional, Union import flair from flair.data import Corpus, FlairDataset, Sentence, Token from flair.datasets.base import find_train_dev_test_files from flair.file_utils import cached_path log = logging.getLogger("flair") class UniversalDependenci...
4c1a09e79bcf3497bf8f060bf477f33ee287bfbab73e604c5613b5e879a9afba
Python
68,887
1,551
import inspect import os import random import re import tempfile import warnings import zipfile from abc import abstractmethod from io import BytesIO from pathlib import Path from typing import Any, Callable, Dict, Literal, Optional, Union, cast import torch import transformers from packaging.version import Version fr...
14e46978790d86a138ea372c925679785d2accbd671346bd0ce6b6650a0a2821
Python
69,486
1,644
import numpy as np import os import matplotlib import tkinter as tk import tkinter.messagebox # Set the matplotlib backend to tk figures. # If imported, cannot plot to regular matplotlib figures! from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.figure import Figure from seas.signalanaly...
bdb365301f815ab8df19c10ab035ffa8773fad8307bfc8ca432d01bd180890a2
Python
69,766
1,915
# Copyright 2019-2026 The AmpliGraph Authors. All Rights Reserved. # # This file is Licensed under the Apache License, Version 2.0. # A copy of the Licence is available in LICENCE, or at: # # http://www.apache.org/licenses/LICENSE-2.0 # import json import logging import os from collections import namedtuple from a...
c42c7f63b21d157e4533bf7897bdf630339e702fa39e02ba63d4fe4d6fa067e3
Python
70,517
2,168
#!/usr/bin/env python # -*- coding: utf-8 -*- """BBOB noiseless testbed. The optimisation test functions are represented as classes `F1` to `F24` (and `F101` to `F130`). This module implements the class `BBOBFunction` and sub-classes: * class `BBOBNfreeFunction` which have all the methods common to the classes `F...
75545f1263c5df9392c84ca10b0671155ef3dcfae5da41f25791cca0fecd6ab8
Python
71,185
2,307
# Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations from typing import ClassVar import automatic_conversion_test_base import numpy as np import pytest import onnx from onnx import TensorProto, helper ####################################################...
2376dcce95f2e5be9524c09ac91ff78fcdf481ee6ca8ff582e03b7942fa848dc
Python
72,081
1,976
"""Atoms and Molecules module. This module contains a series of tools and functions in order to create and handle molecules in a different ways Attributes: DIM_DICT (:obj`dict`): translation dict for cartesian coordinate system """ import warnings from itertools import product from collections import OrderedDict,...
628c1047b555d21fce1f0d317f3bcf8655f5c224559005d0b2f1c7d16aded1b6
Python
72,340
1,730
# SPDX-License-Identifier: LGPL-3.0-or-later import math import types from typing import ( Any, ) import torch from torch.fx.experimental.proxy_tensor import ( make_fx, ) from deepmd.dpmodel import ( get_hessian_name, ) from deepmd.dpmodel.atomic_model.base_atomic_model import ( BaseAtomicModel, ) fro...
ad8a549ca09c4627f0ff61c16115ab757cbe25a928ae9a2f44047c9edd70f2be
Python
72,538
6,951
""" @file: plane_policy_representation.py Created on 18.04.19 @project: CrazyAra @author: Moritz Willig and later updated by queensgambit Functionality for representing all possible moves in the policy feature maps. Note, most of the entries in the policy feature map are unusable because the represent illegal moves wh...
1bf2215d7ec811f5ead42b8556b70b26803df3e656f0bb79bd8d83339877ab7a
Python
72,645
1,645
""" These are functions that are shared by odp, odp_trio, and other scripts """ # this is all needed to load our custom fasta parser import gzip import os import sys snakefile_path = os.path.dirname(os.path.abspath(__file__)) dependencies_path = os.path.join(snakefile_path, "../dependencies") sys.path.insert(1, depend...
78f0700ffb036fcdf46a133d2fbc0806027505a3cc4654452c3ab48e5064fb4a
Python
72,674
1,689
#!/usr/bin/env python3 """ run neurondm related exports and conversions Usage: neurondm-build release [options] neurondm-build all [options] neurondm-build [indicators phenotypes] [options] neurondm-build [models bridge old dep dev neurdf] [options] neurondm-build [sheets] [options] Options: -h...
905428c63ba0eb7f0e4a8cfbcbf11fbee4dc0b03db6f4d03a15a8e7fb67d859a
Python
73,128
2,031
# Copyright 2026 DeepMind Technologies Limited # # 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 agr...
965a673dd7c738718ed8c03a1d3dc2f175ce51e9ac5186630f5929c82437823d
Python
73,422
1,913
# Copyright 2019-2026 The AmpliGraph Authors. All Rights Reserved. # # This file is Licensed under the Apache License, Version 2.0. # A copy of the Licence is available in LICENCE, or at: # # http://www.apache.org/licenses/LICENSE-2.0 # """Data indexer. This module provides a class that maps raw data to indexes an...
fd7fae4a76849c44677401649e87f08e40425ab6bbb9c36b0c1a1fc5d32e7435
Python
73,774
1,773
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 req...
c910d331fc21fd8a5748a2840fc72da05839e86c0014eeafe5dc7df15a79a73a
Python
73,880
1,950
#!/usr/bin/env python # -*- coding: utf-8 -*- """CauKer V2 generation and pre-generated KernelSynth Arrow readers. The offline KernelSynth shard generator is intentionally not part of this repository. ArrowSyntheticIterableDataset consumes shards produced ahead of training and does not generate those shards itself. ""...
2751653cd7f101378e0c42b53e432a8a9d46c0ae008e01aa3bf4e003486e8e87
Python
73,883
1,777
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 req...
7d54251268e61d11999b0c7f640c7a24863ce879025b10c077c00f635d7ee2db
Python
74,309
1,695
import pytest import unittest import subprocess import pprint from pathlib import Path from collections import Counter import rdflib import ttlser from pyontutils.core import yield_recursive, OntGraph, bnNone, OntResIri from pyontutils.identity_bnode import bnodes, IdentityBNode as IdentityBNodeBase, idf, it as ibn_it ...
b3d994e93ff2e530176714a7373aa341c26e7bf1b337bade7cb6a5e837b90666
Python
75,034
1,860
# Copyright 2018-2026 # Institute of Neuroscience and Medicine (INM-1), Forschungszentrum Jülich GmbH # 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/LICE...
b0695a4574225e459bc530653417f8368b6237d58f93a6496baefaed982a2f15
Python
75,151
1,843
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-3.0-or-later import bisect import copy import functools import hashlib import logging from collections.abc import ( Iterable, Iterator, ) from concurrent.futures import ( ThreadPoolExecutor, as_completed, ) from pathlib import ( Path, ) from ty...
dd14fc50a1a0ac74aae785cbf6d1d2c6834a6c48931de35f503a218be7959233
Python
75,240
1,421
# uncompyle6 version 3.7.5.dev0 # Python bytecode 3.7 (3394) # Decompiled from: Python 2.7.17 (default, Feb 27 2021, 15:10:58) # [GCC 7.5.0] # Warning: this version of Python has problems handling the Python 3 "byte" type in constants properly. # Embedded file name: /home/timsit/multisensory-integration/src/models/de...
bac9c40a8bff889efe99c2345536c549a1c95e74d3b47e9138334221aa7fe24b
Python
75,872
2,398
""" Unfinished. Attempting to create a more object-oriented extensible version of Foraging. Goals: - Runs with or without stimuli of any kind. - Add foraging objects (lick sensors, encoders, stimulus objects, etc) a la carte. """ import time import datetime import numpy as np impor...
34903d3e4213b24b6d8d6565ec45b9a33c9317f2803745c558a9a1d097a1ba15
Python
76,966
2,329
import io import xml import functools import itertools import warnings import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from PIL import Image import pytest from pandas.testing import assert_frame_equal, assert_series_equal from numpy.testing import assert_array_equal, as...
c4bd52a3fc9c943bded7b00dd5ea959245ba78803d32730ae10c4e0256672420
Python
76,996
2,036
# SPDX-License-Identifier: LGPL-3.0-or-later import dataclasses import math from typing import ( Any, ) from unittest import ( mock, ) import numpy as np import pytest from deepmd.dpmodel.descriptor.dpa4c import ( DescrptDPA4C, ) from deepmd.dpmodel.descriptor.dpa4c_nn import ( build_angular_basis, ...
286bcfeff92297dbcf9f795f34317e64e53db091f1c4ed6acf029bfb43fa3e29
Python
79,865
2,491
import itertools import warnings import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.colors import to_rgb, to_rgba import pytest from numpy.testing import assert_array_equal, assert_array_almost_equal from seaborn import distributions as dist from seaborn.palettes import ( ...
e004179e547ddf8a254cd1689843cc2093c3027b88c9becdef3cadd0b0a048b3
Python
80,189
1,630
import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib.colors import to_rgba import seaborn as sns import multiprocessing import os sns.set() sns.set_style("whitegrid", {'axes.grid' : False}) from functools import reduce from sklearn.neighbors import KernelDensity from sklearn...
00a72ff2abff51483d7cdf16d56fec116ebc3dd86cf59d5d98fcdc7d82fcce22
Python
80,634
1,614
# Copyright 2007 Zachary Pincus # This file is part of CellTool. # # CellTool is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. """Classes for dealing with data organized as 2D point clouds and con...
e38d1fe34e012872d7997fa1dab35e00459c855c5dc16212c8bab16fbdbd23ec
Python
81,584
1,662
""" This is an implementation of the LDDMM algorithm with modifications, written by Devin Crowley and based on "Diffeomorphic registration with intensity transformation and missing data: Application to 3D digital pathology of Alzheimer's disease." This paper extends on an older LDDMM paper, "Computing large deformat...
31970764b3020746b3f106c98cafa585225237fc0641957db63fd337b3ff20ea
Python
81,946
1,933
import copy import io import logging.config import os import shutil import git import h5py import matplotlib.pyplot as plt import numpy as np import pandas as pd import tensorflow as tf import tensorflow_probability as tfp import yaml from lfads_tf2.defaults import get_cfg_defaults from lfads_tf2.initializers import v...
3e0190c770a986d48ddb9981757124c83e8824d8e5b89201973f446ecb12ca86
Python
82,441
1,787
import os import random import itertools as it import numpy as np import skimage as ski import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torchvision.models as models import torchvision.transforms.functional as TF import torchvision.transforms.v2 as transfo...
37eb7ed538f119e20f32ce3d85337e70fb0f8edfb095a9293b705f33c24873a9
Python
83,878
1,751
# 4. function that gives a loaded model # 4. function that takes in the model and some sequences and gives embeddings # 3. give file and columns (for cdr3/TCR seqs, and delimiter) from torch.nn import LayerNorm import logging import datetime # from transformers import AutoTokenizer, AutoModel, pipeline import pickle i...
0aa94596b1cd24e5c924c83600f6e453b864c27b059b1af146f5fc53ee81a0ec
Python
85,159
2,351
from __future__ import division from itertools import product from distutils.version import LooseVersion import warnings from textwrap import dedent import numpy as np import pandas as pd from scipy import stats import matplotlib as mpl import matplotlib.pyplot as plt from . import utils from .palettes import color_p...
b4837492172a3bf8a7633066287cd99f072cf1c687569bc7645af43194e7b821
Python
86,026
2,201
# SPDX-License-Identifier: LGPL-3.0-or-later r"""Compact and Compressible degree-wise DPA4 descriptor. DPA4C is the compact and compressible degree-wise member of the DPA4 family, a graph-native local descriptor for lightweight training and for distillation from DPA4. It reuses the DPA4 radial basis, bias-free radial ...
d728a66ff77981fa7090a5c5dcf93830560687e257800efb3ed208538199c4c8
Python
86,239
636
regs_per_section ={1 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl'], 2 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci'], 3 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci', 'EPlA', 'MiA', 'dlo', 'AOL', 'AOE', 'unname', 'lo'], 4 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci', 'EPlA', ...
652813e7d96864659fc5fd30ae9bb612c547e58b5b888ccf0016889fbdc37e4d
Python
86,864
2,532
"""Plotting functions for visualizing distributions.""" from numbers import Number from functools import partial import math import textwrap import warnings import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.transforms as tx from matplotlib.cbook import no...
476308c37379612ccfec9c813b906830e6a70c5dd3e4331d239c5246a2be9b91
Python
87,369
635
regs_per_section ={1 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl'], 2 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci'], 3 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci', 'EPlA', 'MiA', 'dlo', 'AOL', 'AOE', 'unname', 'lo'], 4 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci', 'EPlA', ...
a5508a5ed2a4a4db0684ff71b39146231243b6f7d7f616988acb9b4a2341b47b
Python
87,560
2,401
from __future__ import annotations from itertools import product from inspect import signature import warnings from textwrap import dedent import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from ._base import VectorPlotter, variable_type, categorical_order from ._core.data...
9726a0ea147c4653e6e55396ebe594c06fdad13f44143259b8a16aaff861740c
Python
87,789
2,362
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...
158a17e5af9e118ce4821415c1fa39b4103c7a87190d03a804029f67bb272d36
Python
87,916
2,353
# Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 # mypy: ignore-errors from __future__ import annotations import importlib import itertools import os import numpy as np import pytest from numpy.testing import assert_allclose import onnx from onnx import ONNX_ML, TensorProto, TypeProto...
a3efc04affa842f7396028482c7f017c42b8642204245fa4ddec1a2b7f8e1cd6
Python
88,464
2,504
# -*- coding: utf-8 -*- import numpy as np import scipy.stats as ss import itertools as it from statsmodels.sandbox.stats.multicomp import multipletests from statsmodels.stats.multicomp import pairwise_tukeyhsd from statsmodels.stats.libqsturng import psturng from pandas import DataFrame, Categorical, Series def __co...
df09ec0f342964e6fc553597613fd960fb6747e2e51fc6a87085f5ebe7169ad2
Python
89,339
1,635
import warnings warnings.filterwarnings('ignore', category=FutureWarning) import pandas as pd from pandas import DataFrame from bs4 import BeautifulSoup, SoupStrainer import urllib.request import numpy as np import os import itertools pd.options.mode.chained_assignment = None from rdkit.Chem.Descriptors3D import Asphe...
ee8b64f2d81f043b83f42673792157ea8ef8a907409ad277c809d22047e1bc7c
Python
90,038
2,080
# Copyright 2019 DeepMind Technologies Limited # # 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 agr...
7ba7931600f5632eef44a2d57bf554be92df8110b5f77e5afcd72be4bcb16c79
Python
90,550
6,959
""" @file: constants Created on 26.09.19 @project: CrazyAra @author: queensgambit Definition of all constants for the variants: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Available MODES (active MODE is defined in main_config.py): + MODE_CRAZYHOUSE: -- Input and output constant...
23db8600b8dfd08d30d36cc807771943aafc00b65d35d23c14d62b4f69120b6e
Python
90,780
2,186
# Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import os import tempfile from typing import TYPE_CHECKING import numpy as np import pytest import onnx.defs import onnx.parser from onnx import ( GraphProto, ModelProto, SparseTensorProto,...
e33ab59d2e90a6e8c529b34ac1896a6746bcc895734f0cd05ca63e70955c8a7b
Python
90,984
2,210
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Implements pipelines for forecasting.""" __all__ = ["TransformedTargetForecaster", "ForecastingPipeline", "ForecastX"] import pandas as pd from sktime.base import _HeterogenousMetaEstimator from sktime.datatypes import ALL_TIME_SERIES_MTYPES...
ed14a224ceb66d424f3783692054662727ae94a04d452fcc7c8552b7c66e0a56
Python
91,582
6,983
""" @file: constants Created on 26.09.19 @project: CrazyAra @author: queensgambit Definition of all constants for the variants: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Available MODES (active MODE is defined in main_config.py): + MODE_CRAZYHOUSE: -- Input and output constant...
d2037f166ee486d898ede605c03aec55b04b41a5073bf389cffd75d13fa37234
Python
91,700
1,747
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 22:07:30 2016 @author: tpisano """ import os, sys, cv2, time, re, warnings, shutil, mmap, collections, random, numpy as np, SimpleITK as sitk, multiprocessing as mp import scipy.stats, pickle, scipy.ndimage from skimage.external import tifffile from tools.imageproces...
0c38666041a364592f9514e5f129ca6688fac0d4a8ec29a6f9f40e8f731119e7
Python
91,740
2,182
import csv import json import logging import os import tarfile from pathlib import Path from typing import Optional, Union import flair from flair.data import ( Corpus, DataPair, FlairDataset, Sentence, Tokenizer, _iter_dataset, ) from flair.datasets.base import find_train_dev_test_files from f...
81a0cee06f45a448b84c75c0164efb92a15a336d18eff0e7b288fa22cf93f991
Python
92,329
2,007
from sklearn.pipeline import Pipeline from sklearn import svm from sklearn import dummy import sklearn as skl import sklearn.model_selection as sklselection from sklearn.model_selection import cross_val_score from sklearn.model_selection import RepeatedStratifiedKFold from sklearn.model_selection import RepeatedKFold ...
7887df9299904128c794e20c3ced5ae8e912557deab83d9330b264826e4046b0
Python
92,563
2,007
#!/usr/bin/env python #------------------------------------------------------------------------------- # scripts/readelf.py # # A clone of 'readelf' in Python, based on the pyelftools library # # Eli Bendersky (eliben@gmail.com) # This code is in the public domain #------------------------------------------------------...
fe23bd4574dea469220a048ed6153313fa7dab66cfd3715a4cdf3a4410b5eb5a
Python
92,756
2,509
from typing import Union, Optional, List, Tuple, Dict, Literal, Sequence, Callable, Any import collections.abc as cabc import warnings from copy import copy from cycler import Cycler import numpy as np import pandas as pd from sklearn.preprocessing import StandardScaler from scipy.stats import gaussian_kde import scanp...
f8276ed52aa2a0ce38d90746f38fb4ab5fad4af8b2cbaad478f79b09aeaf40b4
Python
93,473
2,670
# SPDX-License-Identifier: LGPL-3.0-or-later r"""Bindings and immutable artifacts for compressed degree-wise DPA4C. The CUDA operator evaluates the complete DPA4C graph descriptor: the tabulated radial branch and its shared mode profiles, the ordered PairFiLM amplitude, one destination reduction that produces both env...
5bbf1099d19901586089a8e935c1231733c51bbd9f657092fbcd9efb360f795d
Python
93,965
2,422
__author__ = ["chrisholder", "TonyBagnall"] from collections.abc import Callable from typing import Any import numpy as np from sktime.dists_kernels._numba_distances._ddtw import _DdtwDistance from sktime.dists_kernels._numba_distances._dtw import _DtwDistance from sktime.dists_kernels._numba_distances._edr import _...
530fe6c1824f0a037381c28d01cfe46a98e49d69b5ec5498c9bff2743a9a803a
Python
94,050
2,694
import numpy as np import pandas as pd import scipy from scipy import stats, spatial import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.colors import rgb2hex from distutils.version import LooseVersion import pytest import nose.tools as nt import numpy.testing as npt from numpy.testing.decorators...
4d7d61760080a6837778348aa695cff82a850705fc38a6b622c5f6d106c23f10
Python
95,482
2,603
# tifffile/zarr.py # Copyright (c) 2008-2026, Christoph Gohlke # 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, # t...
06046e1c5a3c682fa4c506d6b3b57f58d6b6a2013224feeefb8965a2b9c0081b
Python
96,083
2,306
# Copyright 2019-2026 The AmpliGraph Authors. All Rights Reserved. # # This file is Licensed under the Apache License, Version 2.0. # A copy of the Licence is available in LICENCE, or at: # # http://www.apache.org/licenses/LICENSE-2.0 # import tensorflow as tf import copy import shelve import pickle import numpy as...
74975ac34332e261be030fdfe4abfccf432c48db2ec382bbf68556156ff8bbe5
Python
96,099
2,442
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tabby-Pretrain mixed-data training entry point. The released 165K recipe uses BLAST, pre-generated KernelSynth Arrow shards, and online CauKer V2 samples. The optional GIFT loader is retained only for backward compatibility and is disabled by default; it was not used to...
0905fd0be818a575e3e32409c4f98619c9d29b90c422c4b7f41891881e02e3f1
Python
96,141
1,581
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\design\GUI.ui' # # Created by: PyQt5 UI code generator 5.15.6 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore,...
b608d65a29216a7c867eb6002d099366178fcba41195b99c6ec35e031f545e7e
Python
97,279
662
regs_per_section ={1 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl'], 2 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci'], 3 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci', 'EPlA', 'MiA', 'dlo', 'AOL', 'AOE', 'unname', 'lo'], 4 : ['OV', 'E', 'GrO', 'IPI', 'Mi', 'EPI', 'Gl', 'GrA', 'aci', 'EPlA', ...
719bf6fffa79bf2a3ee454f25509744638ba1e65887341921002d56063cb21c3
Python
98,783
1,652
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\design\GUI.ui' # # Created by: PyQt5 UI code generator 5.15.6 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore,...
5494c6226a6421be891bd2b07f8c2754fbdc51df770d407a2c77b3e5e1877712
Python
99,646
2,788
# Copyright 2026 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
3a4f4160db12cb0d78c86ffbf5d9f62df4b30659900ed64acad27f6bbace6f24
Python
100,665
2,403
# This files contains all funtions and classes needed for running the code in test_notebook.ipynb import os import errno from tabnanny import verbose import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler, MinMaxScaler, QuantileTran...
d91c7af351b6e5776c865cdd0632f9bd247a802aae36ff9111835f781ec9e152
Python
102,216
2,133
# Copyright 2019-2021 The AmpliGraph Authors. All Rights Reserved. # # This file is Licensed under the Apache License, Version 2.0. # A copy of the Licence is available in LICENCE, or at: # # http://www.apache.org/licenses/LICENSE-2.0 # import numpy as np #import tensorflow as tf import tensorflow.compat.v1 as tf t...
fc5e7a25a6fb9d849f4c44b19e15bf1bf0ad6155e9c1bb93176603ef052a77b1
Python
104,466
2,349
import voxelmorph as vxm from classification_models_3D.keras import Classifiers from voxelmorph import layers as vxm_layers from voxelmorph.tf.modelio import LoadableModel, store_config_args from NetworkBasis.densenet import DenseBlocks from NetworkBasis.layers import * from NetworkBasis.swin import * from Net...
5a344afeccc4d174be5cca9e711a50c1e52df69b79fcc3b1abdff596b4d36c88
Python
106,465
2,545
# SPDX-License-Identifier: LGPL-3.0-or-later import functools import json import logging import time from collections.abc import ( Callable, Generator, Iterable, Mapping, ) from contextlib import ( nullcontext, ) from copy import ( deepcopy, ) from pathlib import ( Path, ) from typing import...
7fc0913cb5dda6f3faedaa38b89ead1fb81148863717b9920bf5b149c1306587
Python
109,658
2,089
import sys import hashlib from collections import defaultdict import rdflib from enum import Enum from .utils_fast import log as _log log = _log.getChild('ibnode') bnNone = rdflib.BNode() # BNode to use in cases where subject would be None #_session_only_token = rdflib.BNode() # ensure raw bnode identities cannot ...
54d138ed2a36b0cec2f83bbf8b7d0207a7db42fc7e3897fdb532fd79705f9f14
Python
109,659
1,995
""" Simulation backends for synthetic nervous system networks. Each of these are python-based, and are constructed using a Network. They can then be run for a step, with the inputs being a vector of neural states and applied currents and the output being the next step of neural states. """ """ %%%%%%%%%%%%%%%%%%%%%%%%...
48c3b8c9325a2a127a06ea9b4db561272721f226cfddc7eb5fa41e5f01400644
Python
110,630
2,724
""" model_run2.py - main simulation control. Run a model based on a hoc cell structure, decorating the structure with ion channels and synapses. Requires: 1. Python 3.7, 3.8 or 3.9 (anaconda distribution or a local environment - preferred). 2. Neuron7.7 - 8.0 (neuron.yale.edu) 3. pyqtgraph (Luke Campagn...
cf21dca8e44a1aeacaceb8225cb18ce63f7d75c8d118f8eba803eeb6119797e4
Python
112,935
2,449
from sns_toolbox.backends import SNS_Numpy, SNS_Torch, SNS_Sparse, SNS_Iterative from sns_toolbox.neurons import SpikingNeuron, NonSpikingNeuronWithGatedChannels import numpy as np import torch import sys import warnings def __compile_numpy__(network, dt=0.01, debug=False) -> SNS_Numpy: if debug: print('-...
537eb0bf0ed640e9ebe1d1300d456d0c40b65a70f955eb8ee2de1ab127d405eb
Python
113,123
2,646
import abc import bisect import csv import logging import os import re from collections.abc import Iterable, Iterator from pathlib import Path from typing import Any, Optional, Union import requests from bioc import biocxml, pubtator import flair from flair.data import Corpus, EntityCandidate, MultiCorpus, Sentence, ...