sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
c86144a30fcda8259bb099d6c5a00900c398d756deba79e51bbdd3c72042ef62
Python
80,680
1,927
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from collections.abc import Sized from contextlib import ExitStack from itertools import product from ...
4ad1afaade8d914e6d95aa6b0ac98fcb4109dedad259bdc18322036f1718d8d8
Python
80,871
2,376
"""Utility functions for analyzing the sampling paradigm.""" import itertools import multiprocessing import os import warnings from collections import OrderedDict from functools import partial import mne import numpy as np import pandas as pd import scipy import scipy.signal import scipy.stats from scipy.spatial.dista...
55e1b160dbef9017f5008ff228c541d97f9e40f0b27e639baec6119df2ba093f
Python
81,275
1,814
# Copyright (c) MONAI Consortium # 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 agreed to in writing, so...
0dd767ec1e55cf0fc9401d534ea2a98d325460fe66e61cae584998b4e57ee91d
Python
81,828
1,876
"""Test data_manager.managers module functionality. This file tests the core functionality of the excluded_fields_for_evaluation feature that optimizes task API performance by excluding expensive fields. """ import json from unittest.mock import Mock, patch from data_manager.prepare_params import ConjunctionEnum, Fi...
7c794f2b21de852e61057ce5f69e48fc83921d05b96e14a43e92558bf5994cd2
Python
82,171
1,774
# real non truncating division (same behaviour as in python 3) from __future__ import division import random as rd import networkx as nx import numpy as np from numpy import linalg as la from sklearn import cluster as cl from MolRep.Interactions.link_models.CFLP.pysbm import additional_types from .exceptions import N...
b73953f24dc32d752936636c7bf94c0afb69ba18b57142707c750ea7d7168576
Python
82,606
1,782
import matplotlib.pyplot as plt # To plot from scipy.optimize import curve_fit from pylab import * import numpy as np import random import math import time import os import glob set_sigma_errors = False #True data_sigma_errors = True # False thismaxfev = 10000 def rmsd(x,y): Nx = len(x) N...
0fc0dc69a0991cca04b3b0bd26a805bba6e1f5e54d3662d96fe1ef90842cec9b
Python
82,824
2,116
""" Tabular datatype """ import abc import binascii import csv import logging import os import re import shutil import subprocess import tempfile from json import dumps from typing import ( cast, Optional, Union, ) import pysam from markupsafe import escape from galaxy import util from galaxy.datatypes i...
e9ed5358a5808d141511a294e8990ce8172d569b0f2e971bdaee17cabb53d59d
Python
82,842
1,856
""" Interval datatypes """ import logging import sys import tempfile from typing import ( Optional, Union, ) from urllib.parse import quote_plus import pysam from bx.intervals.io import ( GenomicIntervalReader, ParseError, ) from galaxy import util from galaxy.datatypes import metadata from galaxy.da...
02962eb210dcb5cc141129782bdeb652e504c679b2fc3d4eb66299a04143181d
Python
83,815
1,730
import unittest as ut import networkx as nx import numpy as np import six import pysbm.UnitTests.test_partition as test_sbmpartition from pysbm.sbm.nxpartitiongraphbased import NxHierarchicalPartition from pysbm.sbm.nxpartitiongraphbased import NxPartitionGraphBased from pysbm.sbm.nxpartitiongraphbased import NxParti...
5036ac4a57a60087664e4999f5b230fc046a9d2d877f971e4a4a2da8303ac3a3
Python
83,872
2,197
from __future__ import annotations from collections import defaultdict, deque from collections.abc import Iterator from contextlib import contextmanager from dataclasses import dataclass, field, replace from math import prod from typing import Any, Callable, Optional import torch import torch.nn as nn from torch.over...
48084aa52d26ab8cbb26e17d8d68aafcd6baa735180e4e30adc615f80a9fbbe9
Python
84,026
1,714
# -*- coding: utf-8 -*- """ Created on Fri Feb 7 14:15:34 2020 @author: Maxsc """ import os import re import sys import glob import copy import string import numpy as np import pandas as pd from matplotlib import pyplot as plt from matplotlib import animation from matplotlib.gridspec import GridSpec from contextlib i...
93cad50a3a9fa32f5cf12ddfc514beec444b0d84f8f764e0011625a8bfc51ff8
Python
84,143
2,542
""" Shortest path algorithms for weighted graphs. """ from collections import deque from heapq import heappop, heappush from itertools import count, islice import networkx as nx from networkx.algorithms.shortest_paths.generic import _build_paths_from_predecessors __all__ = [ "dijkstra_path", "dijkstra_path_l...
edc6a8d10943767c27be253f7e66ef77504a7267dadff229eb87f111f234aa30
Python
84,203
627
import pytest from nl_expr.expressions import Symbol from nl_expr.exceptions import UnexpectedTokenError from ...frontend.datalog.standard_syntax import parser def test_interactive_empty_input(): res = parser('', interactive=True) expected = {'Signs': {'values': {'@', '∃', '('}}, 'Numbers': {'values': {'<int...
6b7dc0037145d7832639b60d07b0e279b9e691861e68a2c87b8c47a3cd06b9d0
Python
84,277
1,989
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.""" import json import logging from typing import Any, Mapping, Optional from annoying.fields import AutoOneToOneField from core.current_request impor...
611bf54fbd0b54ac006034eb0227bba9b556b58614e047378a8a2630468aab80
Python
84,282
1,981
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
661a59d3f4f47e3b2be66df5e26735945a40f3affff066d5d525710301c6b32a
Python
84,355
2,032
# Copyright (c) MONAI Consortium # 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 agreed to in writing, so...
ff43bd7f05500245147a7ce159e199e7a010d4b6fc726708273d617ce8af6a2c
Python
84,953
1,912
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import json import logging import warnings from collections.abc import Callable, Generator, Sequence f...
e3b0181b9c3328f4ddbc9a72e17404fc7d97896d5c4818daaf23974d8c09cb31
Python
85,734
1,883
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
fff5adcdfbc013044cb08e6a5de07cdd47b259027b27cef393e97fc15a6af7aa
Python
86,137
662
import pytest from ..interactive_parsing import LarkCompleter from nl_expr.expressions import Symbol from nl_expr.exceptions import UnexpectedTokenError from ...frontend.datalog.standard_syntax import COMPILED_GRAMMAR def test_interactive_empty_input(): completer = LarkCompleter(COMPILED_GRAMMAR) res = compl...
4712fb451f01a30ae06ae4913f7884578ee66539dcbb552eec4122181f732d23
Python
86,144
2,608
import inspect import subprocess import sys import numpy as np import pytest import torch import torch.nn as nn import torch.nn.functional as F from spikingjelly.activation_based import ( ann2snn, base, functional, layer, neuron, ) from spikingjelly.activation_based.ann2snn import ( Conversion...
676ad7c0b4a149bf6045454f19dcadfc61587e820432c24ffb43b3a7599f4220
Python
86,154
2,241
""" objectstore package, abstraction for storing blobs of data for use in Galaxy. all providers ensure that data can be accessed on the filesystem for running tools """ import abc import hashlib import logging import os import random import shutil import threading import time from collections import OrderedDict from ...
780d1083687d27f91bc979e39c44e3abcfab074c1b1a32ee0907f2ca135e3e72
Python
86,412
2,021
# Copyright (c) MONAI Consortium # 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 agreed to in writing, so...
42546a20488f688649550c62609416c3a2612318a65c1fa2d79d038c7ce9dfad
Python
86,536
2,066
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
71c2c02cc5c8849b47699e1e215defc09342c0a94d30a0a84b9bc80ab7b074f1
Python
87,238
2,062
""" Copyright © 2023 Howard Hughes Medical Institute, Authored by Carsen Stringer and Marius Pachitariu. """ import os from cellpose import io, metrics, transforms, denoise, models, plot import torch import numpy as np import matplotlib.pyplot as plt from pathlib import Path import cv2 from tqdm import tqdm from fig_...
b5e970c3b0ae3eca13b6f96963e92d9d9193f39719eb11821996b4bc7bc527e4
Python
87,273
2,342
#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://setuptools.readthedocs.io/en/latest/easy_install.html ""...
10a38b28257e8bc9f7abbd2ee7da87c205abfe334b4921ee8879a98c522deac0
Python
88,127
1,758
""" Partition of NetworkX Graphs based on internal representation as NetworkX Graph""" import random as rd import networkx as nx import numpy as np # from pysbm import additional_types from MolRep.Interactions.link_models.CFLP.pysbm import additional_types from .partition import Partition from .exceptions import NoF...
22ddbc1dd9006a11d187ca8e579d497cc55437ce955917fb66405edeff1bd844
Python
88,237
1,812
import logging import socket import sqlite3 from datetime import timedelta from typing import ( Optional, ) from sqlalchemy import ( and_, delete, false, func, insert, not_, or_, select, text, ) from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import joinedload imp...
4dc29a48675ac7cf11625e2de8e955ec7a97fcf9f6c9141e5529eadd0020a6f2
Python
88,456
1,850
import sys from pathlib import Path from scipy.stats import wilcoxon import fastremap from scipy.ndimage import gaussian_filter1d import matplotlib.pyplot as plt import numpy as np from cellpose import io, utils, metrics, denoise, transforms import matplotlib import matplotlib.gridspec import matplotlib.transforms as...
b094cc48fa224cf486e0b6dc9dabeec462803ab140eb77474717fa7ac36d360f
Python
88,769
2,116
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import logging from typing import cast from unittest import mock from unittest.mock import MagicMock, ...
74b1083090f94ae373b2470c83fe44998333133aee2c236d34feedf1ee659a75
Python
89,455
1,917
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
0ef86d029dbd5e6fd117425014448e27315e7d361e487c58d6001eb6cbfc42ce
Python
89,664
3,114
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
4509ee75b620e56b97fcb2d8c44b041a6b1dfae97446e3c08d9c0e09e77777f3
Python
89,665
2,479
from inspect import signature from itertools import product from operator import eq import logging import pytest from nl_expr.config import config from nl_core.datalog import Conjunction, Implication, Negation from nl_expr.expression_pattern_matching import add_match from nl_expr.expression_walker import ( Expres...
6f455b994c16c6af931f34da1cf6ac6e88baf3844c11e49353952727fb6fbdad
Python
90,068
2,120
from __future__ import division, print_function from fanc.config import config import matplotlib as mpl from matplotlib.ticker import NullLocator, MaxNLocator from fanc import load from genomic_regions import GenomicRegion, GenomicDataFrame, merge_overlapping_regions from fanc.plotting.base_plotter import BasePlotter1D...
a1bb3fba43f397041e31b04e6b5c4643394bbc29c2890daca74c550fab56ee18
Python
90,119
2,574
import array import atexit import json import os import pathlib import sys import pickle import shutil import tempfile from contextlib import contextmanager from pickle import PicklingError from zipfile import ZipFile import numpy as np import pytest from numpy.testing import assert_array_almost_equal, assert_array_eq...
35b3ba648c709cd9513b2f7734b888e099dc1ad9113f57c6d8bf0c5055e39026
Python
91,696
2,180
""" Copyright © 2025 Howard Hughes Medical Institute, Authored by Carsen Stringer, Michael Rariden and Marius Pachitariu. """ import logging import sys, os, pathlib, warnings, datetime, time, copy from qtpy import QtGui, QtCore from superqt import QRangeSlider, QCollapsible from qtpy.QtWidgets import QScrollArea, QMa...
700998da86b26bd351313d185058eb4bd4ff42b19700c1cfc5503cc5d58f600b
Python
92,294
2,363
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import json from collections.abc import Callable, Collection, Iterable from copy import deepcopy from functools import partial from http import HTTPStatus from itertools import groupby, product from typing import Any import pytest from cvat_sdk.api_...
1dd1042742319c5e12500e956756a4075aeaecc6f479dcbe69fa80a27d5829d4
Python
92,879
2,844
import itertools from typing import AbstractSet, Callable, Tuple import numpy as np import pandas as pd import pytest from nl_expr.exceptions import ( NegativeFormulaNotNamedRelationException, NegativeFormulaNotSafeRangeException, NeuroLangException, SymbolNotFoundError, UnboundVariablesError, ...
77499c9df64b4273c4fb192ba17580a389199d007d77c9a422d8d6d1ae6956dd
Python
93,224
2,675
# -*- coding: utf-8 -*- """ StitchingWobbly =============== Wobbly stitching module handles the alginment of large volumetric data sets. The module alings stacks allowing them to wobble around a wobble axis, i.e. due to oscillatory movements during image aquisition. """ __author__ = 'Christoph Kirst <christoph.ki...
4be41f2a7d492dc09fb7689989d433917a9f107465dd4b3bcc16e0fe4a714854
Python
93,370
2,313
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
117d7dfbf75d74c8148fe03f06b1ba3d882907369e7b134f6bcb2e9294798aa3
Python
95,834
2,782
import binascii import hashlib import itertools import math import operator import re from functools import reduce from typing import Any import numpy as np from numcodecs.compat import ensure_bytes from zarr._storage.store import _prefix_to_attrs_key, assert_zarr_v3_api_available from zarr.attrs import Attributes fr...
b03328ab32df8e07409c28af5819319255c3dc7b5bc6e30148960281fb7745b5
Python
96,590
2,707
import logging import operator from collections import Counter from functools import reduce from itertools import chain, combinations, product from typing import AbstractSet import numpy as np from .. import relational_algebra_provenance as rap from nl_expr.config import config from ..datalog.expression_processing im...
447dda1a594ddf2881ee503b394bcde62145b5cb4ef6793f556101cd9590be18
Python
97,547
2,183
# Notes about NetworkX namespace objects set up here: # # nx.utils.backends.backends: # dict keyed by backend name to the backend entry point object. # Filled using ``_get_backends("networkx.backends")`` during import of this module. # # nx.utils.backends.backend_info: # dict keyed by backend name to the metadata...
898f19fb87bd86b2246c1417a937b161b01d46a452de76008c2eb6371616fd85
Python
98,369
2,474
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from copy import deepcopy from typing import cast from unittest.mock import MagicMock, Mock, patch im...
7b0c05095fba7fac065b7d707dc2db2ef81a3242db05eb163c43462a86e170a6
Python
98,528
1,877
# -*- coding: utf-8 -*- """ Created on Fri Sep 8 16:17:25 2017 @author: Max """ from .tools.neuriteconstructor import neuriteConstructor from .tools.thresholdneuron import ThresholdNeuron from .tools.analyzers import Analyzers from .tools.dataframecleanup import DataframeCleanup from .tools.sortpoints import sortPoi...
aa6835d107e810261d4e51c6e80b3f9385af8abeb64b5888b133703af584af8e
Python
98,764
2,261
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from __future__ import annotations from collections.abc import Callable, Generator, Iterable, Mapping...
444be834eef62e0995d269843853eb57d66b758a3b20e7d817d887f39293f3b5
Python
99,831
2,894
"""This module contains storage classes for use with Zarr arrays and groups. Note that any object implementing the :class:`MutableMapping` interface from the :mod:`collections` module in the Python standard library can be used as a Zarr array store, as long as it accepts string (str) keys and bytes values. In additio...
4c01e23a648026d4c5bcde4ff24c4a79e777df860ebfe26a46be7421e09f31d9
Python
100,303
1,875
# -*- coding: utf-8 -*- """ Created on Fri Sep 8 16:17:25 2017 @author: Max """ from .tools.neuriteconstructor import neuriteConstructor from .tools.thresholdneuron import ThresholdNeuron from .tools.analyzers import Analyzers from .tools.dataframecleanup import DataframeCleanup from .tools.sortpoints imp...
84aceb34ddd2987ced36d0d0629f2f0467627c6b2f838bc68bb6fa56c7314023
Python
100,440
3,297
import math import numbers import torch import torch.nn as nn import torch.nn.functional as F from . import quantize def heaviside(x: torch.Tensor): r""" **API Language** - :ref:`中文 <heaviside-cn>` | :ref:`English <heaviside-en>` ---- .. _heaviside-cn: * **中文** heaviside阶跃函数,定义为 .. ...
2fdce0097c6374de54ca70e51633234bccced1582fd122dc2e71a424f3dc9dd5
Python
100,673
2,769
import matplotlib import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib import gridspec import parmap import numpy as np import os import glob2 import warnings import pickle import torch import pickle as pk import pycorrelate import thundersvm import sklearn from sklearn.preprocessing import Stand...
6d8b86aaedf2ae62f17e0fbcc689a220132c46b34c25bc7f79444da887a122f5
Python
101,243
2,043
# Copyright (c) 2017, 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: # * Redistributions of source code must retain the above copyright # notice, this list of conditio...
b4c67f01d564f96fa11a3ff46e24381262c91fda93f0662ef6240fa78e0ccf42
Python
101,264
2,083
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
dd7b5e28c93013c40dc8ac3a11133dd6eedd3b198fe84423ff3cbb2bd2b08b29
Python
101,362
2,388
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import dataclasses import inspect import math import warnings from contextlib import ExitStack from co...
f73c33235bcc30c270ebb90020cbb91470a5d79002cb7760db80f11fa2248224
Python
103,131
2,601
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1824244004e665134162eab8efc85e35e845e1cc51f4cf8b3f1e0fda099cfa89
Python
103,212
2,790
#emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- #ex: set sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See the COPYING file distributed along with the smile package for the # copyright and license terms. # ### ### ### ### ### ### ### ...
ead29c47ec03f56deb2ee4f54779f9f92afde60a1dc90c4a4d97bbbee2b3dd8c
Python
104,256
2,993
""" ********** Matplotlib ********** Draw networks with matplotlib. Examples -------- >>> G = nx.complete_graph(5) >>> nx.draw(G) See Also -------- - :doc:`matplotlib <matplotlib:index>` - :func:`matplotlib.pyplot.scatter` - :obj:`matplotlib.patches.FancyArrowPatch` """ import collections import itertools import...
24693dd817b7f7e6bcb10225b63645f8393d64e200474969099f6b62b1877d53
Python
104,648
3,171
# coding: utf-8 """ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path opera...
ab01b7a602fa34dca86e842979f9cdb1ee0c1ce8ee4070f7bdadf3a2469e179e
Python
105,222
1,216
__author__ = "Simon Nilsson; sronilsson@gmail.com" from simba.utils.printing import (SimbaTimer, stdout_information, stdout_success, stdout_warning) load_timer = SimbaTimer(start=True) import os.path import warnings warnings.filterwarnings("ignore", category=FutureWarning) warnings....
ea9b8e9ff492c47e1df53744c511cdcb2b5c5de9f59570bb6a3afd6129a16afd
Python
105,450
3,179
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from __future__ import annotations import itertools from collections import OrderedDict from collect...
267d7bdf398a34e43484fd82355cfb12402fa2909ceda23855fcdd39bdfe9c17
Python
105,829
2,633
from __future__ import division import copy import gzip import logging import multiprocessing as mp import os import threading import uuid from abc import abstractmethod, ABCMeta from bisect import bisect_right from builtins import object from collections import defaultdict from queue import Empty from timeit import d...
77f7a86d148c6bc82bf759d54955e52621ad83151508e7c3a5d942c197664ca5
Python
106,915
1,814
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master...
3a63ffb1874bd1b4da5ca15cca4c63ff178cef7496ec47f3d82ecd71c809838d
Python
107,286
2,324
# Copyright (c) MONAI Consortium # 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 agreed to in writing, so...
a466699dd5d2577e2e762578e13dfd37025b266ca6121ef995a4ad848e85f77a
Python
109,145
2,385
import hashlib import json import logging from collections.abc import Iterable from dataclasses import dataclass from datetime import ( date, datetime, ) from pathlib import Path from typing import ( Any, cast, Optional, TYPE_CHECKING, TypeVar, Union, ) import sqlalchemy from boltons.it...
49a6914fb964bbc439534d9aa083c9aac4fb67a29735536f89ff2702aa470a03
Python
109,394
2,604
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from __future__ import annotations import inspect import logging import warnings from collections imp...
416e76ff063a278644245d7d1e6428088c02436e00baaf250ab1f06f38be97a3
Python
109,458
2,709
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import dataclasses import json import math import os import tempfile from collections import OrderedDi...
b201e28ead9dea38c29cc17e8dccb66ce0e1a58425b65ceff45b82954014c4f4
Python
111,652
3,161
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
15b0ea014e512376a2e525f394878e1eea6f9d956945fa1feeb5da8e75326902
Python
112,971
3,023
r""" SQUALL (Semantically controlled Query-Answerable Logical Language) parser. Translates controlled English sentences into NeuroLang logical expressions using a Lark grammar and Transformer. Uses Continuation-Passing Style (CPS) for correct quantifier scoping following Montague semantics. Supported CNL constructs -...
858ee477349d1576f13b4d2673552ff95fc47f6980fc115c26a66260aad3cf00
Python
113,434
2,221
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
5328d903392f09973935659d490e821f600ce0acd36b1d6d067d9e620f453ffb
Python
113,695
2,734
# Copyright (c) MONAI Consortium # 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 agreed to in writing, so...
ebde1486033aa23f644c6a7323770d866007a15fa7f64cf3f1e52a6ba5295c0f
Python
113,793
3,333
import copy from collections import namedtuple import pytest import torch import torch.nn as nn import torch.nn.functional as F try: import triton # noqa: F401 _TRITON_AVAILABLE = True except (ImportError, OSError): _TRITON_AVAILABLE = False from spikingjelly.activation_based import base, functional, n...
262462358e6cd6ac4382178354977acbafa5f311509b0e2c2d6fd5663e805d13
Python
114,588
2,539
import sys import pathlib import pandas as pd import matplotlib.gridspec as gridspec from matplotlib.ticker import ScalarFormatter from mpl_toolkits.axes_grid1.inset_locator import inset_axes import seaborn as sns from mayavi import mlab from pyface.api import GUI import scipy.ndimage import scipy as sp from scipy.st...
35589f0665ba2b77a743d770c85815020f990e67ec8b574c18d2feefef18e149
Python
116,027
2,810
""" """ import logging import os import warnings from bisect import bisect_right from collections import defaultdict import intervaltree import numpy as np import tables from future.utils import string_types from genomic_regions import RegionBased, GenomicRegion from .config import config from .general import Mas...
1fe14edeb0f52a8ac25dafda7962146a1ec837427dd52ec53798b7da50e1c294
Python
116,674
2,267
import math import random as rd from unittest import TestCase import networkx as nx from pysbm import sbm from pysbm.sbm.nxpartitiongraphbased import NxHierarchicalPartition from pysbm.sbm.peixotos_hierarchical_sbm import DeltaModelLogLikelihoodOfHierarchicalMicrocanonicalDegreeCorrectedSbm from pysbm.sbm.peixotos_hi...
0f4063fb2f9e91f00b827f57083cb1642463317b776ca4b1a62ffc3cc4f7cda3
Python
118,035
3,658
import matplotlib import matplotlib.cm as cm from matplotlib import gridspec import parmap import numpy as np import os import matplotlib.pyplot as plt import pickle from sklearn.decomposition import PCA from scipy.spatial import ConvexHull from tqdm import trange from scipy.spatial import cKDTree import pycorrelate i...
1355ec6628fb626c7101e7534352eaebd10da8766a70fe718e3a18dd3a4fac5e
Python
118,275
3,300
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
b2b5d82f7cd8645e647b8986cd69f695d6f4c1404ec458d7aa535f4c9821497e
Python
118,388
3,663
import matplotlib import matplotlib.cm as cm from matplotlib import gridspec import parmap import numpy as np import os import matplotlib.pyplot as plt import pickle from sklearn.decomposition import PCA import pycorrelate from scipy.spatial import ConvexHull from tqdm import trange from scipy.spatial import cKDTree ...
59dae0da9ee969c35c07d0e8a90f93ba27c1e567c1356e4c2d1bb96f26f4b345
Python
119,106
2,869
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from time import sleep from unittest.mock import MagicMock, patch import pandas as pd from ax.adapter...
dbc0baf9a2a8702dfd2781b125d84e0fbd78f5eba710a0be7a2bab39987ba8c3
Python
120,890
2,603
import json import logging import os import uuid from typing import ( Annotated, Any, cast, NamedTuple, Optional, TYPE_CHECKING, TypeAlias, Union, ) import yaml from gxformat2 import ( from_galaxy_native, ImportOptions, python_to_workflow, ) from gxformat2.abstract import fr...
f33c1fad82be571373d13bc3ed1dfb7ebda38c73d697f7f0e9d4145096b60cd7
Python
123,969
3,379
import atexit import os import sys import pickle import shutil import unittest from itertools import zip_longest from tempfile import mkdtemp import numpy as np import pytest from numcodecs import (BZ2, JSON, LZ4, Blosc, Categorize, Delta, FixedScaleOffset, GZip, MsgPack, Pickle, VLenArray, ...
5077a540fd082f5e44f8a9459879d6ce2be10a7ab6efdbfa41b96e3b36fc8fc1
Python
124,995
2,984
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from __future__ import annotations import dataclasses import itertools from contextlib import ExitSta...
ce6d65bb92727a73e6b5cb57711469d80324e82cbf4f2eb65c7121e96d7cf9a0
Python
125,341
3,883
import matplotlib import matplotlib.cm as cm from matplotlib import gridspec import parmap import numpy as np import os import matplotlib.pyplot as plt import pickle from sklearn.decomposition import PCA import pycorrelate from scipy.spatial import ConvexHull from tqdm import trange from scipy.spatial import cKDTree ...
50793350ece78d412d678d7f1541c297c08055ba0390c765bedad69df70ec292
Python
127,831
3,967
import matplotlib import matplotlib.cm as cm from matplotlib import gridspec import parmap import numpy as np import os import matplotlib.pyplot as plt import pickle from sklearn.decomposition import PCA import pycorrelate from scipy.spatial import ConvexHull from tqdm import trange from scipy.spatial import cKDTree ...
48c9f6204e51df8621dab9526731d27c378d2c0777516e2cc5935d4d0e943872
Python
128,963
3,994
import matplotlib import matplotlib.cm as cm from matplotlib import gridspec import parmap import numpy as np import os import matplotlib.pyplot as plt import pickle from sklearn.decomposition import PCA import pycorrelate from scipy.spatial import ConvexHull from tqdm import trange from scipy.spatial import cKDTree ...
88273a4b4f2e5e11f08f359387945b4fb986834e95c5ea1793e9b6268a1bc5ff
Python
129,795
3,038
# Copyright (c) MONAI Consortium # 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 agreed to in writing, so...
9b041dbf121cc0b91c70ae566b41cab70c83288292eab78d3ed06b0e2f6ec23a
Python
131,461
3,883
# import matplotlib # import matplotlib.cm as cm # from matplotlib import gridspec # import parmap # import numpy as np # import os # import matplotlib.pyplot as plt # import pickle # from sklearn.decomposition import PCA # import pycorrelate # from scipy.spatial import ConvexHull # from tqdm import trange # from scip...
29f47ddb65ae4afa4dc854f0fa04accaf38edace8629aa2577896a372e07ce94
Python
136,131
2,741
# Copyright (c) MONAI Consortium # 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 agreed to in writing, so...
a956a3e370a18015ab6668ebf36e09f1e267a91fd01fbc7ad5a781bc34a808a0
Python
136,281
3,239
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from __future__ import annotations import logging import os import re import time from collections.abc import Callable, Iter...
25ccfdbe4ad986611630ef8f6b775870835415c84cb165dbbc8e3e4851f30413
Python
137,130
3,401
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
0d7a23610af493f8f26b0fff31c0505e3bb111d194ab3ab8ed34d80b8ec96e2c
Python
139,329
3,279
""" This module provides a number of classes for the calculation of Hi-C (and other matrices) architectural features, such as AB domains, methods for boundary/TAD identification, and lots more. The classes are built in a way, that only the first method call requesting the architectural feature will trigger the calcula...
d0dbe3b651279d452c5a3fd977094de4781aef7a3a09f18a9757ac638c789098
Python
142,520
4,460
"""This module contains general pydantic models and common schema field annotations for them.""" import base64 from datetime import ( date, datetime, ) from enum import Enum from typing import ( Annotated, Any, Literal, Optional, TypeAlias, Union, ) from uuid import UUID from pydantic ...
21fbe89b30aa4afdba829a130bb9fd552cf69dc49a553bb8ce07dc54e45330de
Python
142,662
3,240
""" Support for running a tool in Galaxy via an internal job management system """ import abc import copy import datetime import errno import json import logging import os import pwd import shlex import shutil import sys import time import traceback from collections.abc import ( Callable, Iterable, ) from data...
c608719b38af2cf7a649487e2f266962778a786038c4d753e63a311155cc20f0
Python
144,247
3,157
# -*- coding: utf-8 -*- # from matplotlib.text import Text import matplotlib.pyplot as plt from matplotlib import lines import matplotlib.transforms as mtransforms from matplotlib import ticker as mplticker from matplotlib.font_manager import FontProperties import numpy as np import pandas as pd import seaborn...
71f1576782fccc643eba48a0097b6a0b4d5b847655543dcc96d4e55504a15254
Python
144,694
3,606
r"""显式的神经元状态转移函数 / Explicit neuron state-transition functions. 单步函数显式接收当前输入和状态,不读取或写入 ``MemoryModule`` 的 memory。 其共同契约是: .. math:: (Y_t, V_t) = \Phi(X_t, V_{t-1}; \theta) 其中 :math:`V_t` 可以是一个或多个状态张量;具体神经元自行定义 :math:`\Phi`,不要求拆分为固定的充电、发放和复位步骤。状态生命周期由拥有它的 neuron module 管理。 多步函数接收时间优先的 ``[T, ...]`` 序列,返回输出序列和最终状态。...
d13adfe6c8d4281429a9ea25a516d31e2d3c73f46420fd65e94fa155a2d93d5a
Python
145,212
4,698
# -*- coding: utf-8 -*- """ Stitching base module for aligning and stitching data sets. The module features a plane wise alignment routine for data in which individual image stacks show oscillatory movements in itself. """ __author__ = 'Christoph Kirst <christoph.kirst.ck@gmail.com>' __license__ = 'GPLv3 - GNU Ge...
ebb06f6e221096aa019e9092cc399bcde880836c8974ef926c90bfa8918e72e0
Python
147,309
3,701
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import math import sys import time import warnings from collections.abc import Sequence from itertools...
976b422df5631ddc025b2c37d31371df3c422e46e6a8fde3c4b6f3d42328b375
Python
148,877
679
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Egor Zindy <egor.zindy@manchester.ac.uk> # # 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-...
6fb329fb934d3a242f78c35ff3e501425a4d2589b9e5d6ca8c5d5d3c91447c62
Python
151,204
3,249
import abc import contextlib import datetime import logging import os import shutil import tarfile import tempfile from collections import defaultdict from collections.abc import ( Callable, Iterable, Iterator, ) from dataclasses import dataclass from enum import Enum from json import ( dump, dumps,...
8465e432fd8bebe793e5fcb0360e14a6c8e8f9c4ee45b314353a144286a57c5a
Python
154,753
3,482
"""A mixin that extends a HasDriver class with Galaxy-specific utilities. Implementer must provide a self.build_url method to target Galaxy. """ import collections import contextlib import random import string import time from abc import abstractmethod from dataclasses import ( dataclass, field, ) from functo...
4cf753c28a82ec53ecbbd5594e05ed57c205a68772d6c2cef4134373fd9dc4b3
Python
154,834
4,961
# -*- coding: utf-8 -*- """ StitchingRigid ============== Stitching module for aligning and stitching data sets ridgidly. The module provides base classes and routines for stitching images. The :mod:`~ClearMap.Alignment.Stitching.StichingWobbly` module builds on this module. """ __author__ = 'Christoph Kirst <chr...
010d8b1dbf8197a2cf3186227fda2708fe38505b7cc8831df1e6999232262b15
Python
161,196
3,653
#emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- #ex: set sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See the COPYING file distributed along with the smile package for the # copyright and license terms. # ### ### ### ### ### ### ### ...
f7e8021b0cd60d15c76b5cc26ccde14298f7b406421cccb471fa0a29f76c4d83
Python
161,356
3,777
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import logging from collections.abc import Callable from datetime import datetime from decimal import ...