sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
c81f9ec211edf12f034d344893e74d2b6b4f30d536e253638bd7c35bf5daceef | Python | 38,805 | 794 | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'project.ui'
##
## Created by: Qt User Interface Compiler version 6.8.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
###################... |
377e75d3416dd70d6d1cda97982e8a9432a175076cd0651579c2924dbff289ee | Python | 38,843 | 1,161 | """Core implementation of import.
This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing ver... |
f83affc59b40f598bc103f0bac400a8c619545c02914785823354f55702644a3 | Python | 38,849 | 1,110 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This file is part of BORIS.
BORIS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the L... |
ecc6a15b77e4f4d1c07a4217439e0c97868b9a12971c9ada255f79840ef1d21f | Python | 39,365 | 834 | #!/usr/bin/env python3
"""
MAG-S3 confirmatory analysis, protocol version 0.4 (draft).
I1-I5 invariants: "error" invalidates the run
Q1-Q4 expectations: they gate the hypotheses
H1-H5 hypotheses: "met", "not met" or "untestable"
E1-E5 exploratory maps
A seed is one virtual bird. Stage 1 runs every map... |
86fdfa74da9f29e092e7cc9fe8e31367cd48b0c8d4c70eb16537e7e13502bb99 | Python | 39,407 | 1,178 | """ Tools for using spherical harmonic models to fit diffusion data
References
----------
Aganj, I., et al. 2009. ODF Reconstruction in Q-Ball Imaging With Solid
Angle Consideration.
Descoteaux, M., et al. 2007. Regularized, fast, and robust analytical
Q-ball imaging.
Tristan-Vega, A., et al. 2010. A new metho... |
ee93a7197eb3cc2fb691181106909b051ce6b487223c265309a835d86dac80a5 | Python | 39,492 | 956 | """Transforms for resizing images and associated data.
This module provides transform classes for resizing operations, including uniform resizing,
scaling with aspect ratio preservation, and size-constrained transformations.
"""
from __future__ import annotations
from collections.abc import Sequence
from typing impo... |
38013487b65fcf92e6e9cedc89de37d3284520a8f2d1b87b12530e52303499d4 | Python | 39,500 | 1,103 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This file is part of BORIS.
BORIS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the L... |
25417e5aff9d5b4e160dc2179dc7dd779467a64ae7acc8dd9631805b96e0c32d | Python | 39,586 | 902 | # -*- coding: utf-8 -*-
"""
YouLabel: Software with GUI to view and label images of hdf5 datasets
"""
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtWidgets, QtGui
import os, sys
import numpy as np
rand_state = np.random.RandomState(13) #to get the same random number on diff. PCs
import traceback... |
e444f091f36aa81f973817f13318a3e6374178cfe4c4ee998cd184e19afb80e7 | Python | 39,728 | 852 | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'preferences.ui'
##
## Created by: Qt User Interface Compiler version 6.10.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
##############... |
85f919ef8ea6b3f3de77e700500b9c900405bd2713dee9b3cd9133285e0e373d | Python | 39,992 | 1,031 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your... |
a64b35f5904887dbc27c7ddb15ea2ec8517e237f8e9971c36667e7d86160d20b | Python | 40,063 | 812 | # -*- coding: utf-8 -*-
"""
Created on Sat Jan 8 05:27:20 2022
@author: llea4
"""
# %%
print('(1)-(1)-(1)------------------------------------------------(1)-(1)-(1)')
print('######################################################################')
print('###### Building the Models basic constances base on p... |
9087c7e59620cde42bba6fc713502e910f40e95412183d30dda40828fff67eb2 | Python | 40,174 | 932 | from __future__ import division, print_function, absolute_import
import logging
import numpy as np
import nibabel as nib
from dipy.align.imaffine import AffineMap, transform_centers_of_mass, \
MutualInformationMetric, AffineRegistration
from dipy.align.imwarp import (SymmetricDiffeomorphicRegistration,
... |
38d8e904102330182b9e910c6b9ba10153c4a91f3db0b8a18175c75f37971b35 | Python | 40,211 | 1,204 | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import os
import sys
import contextlib
from os.path import join as pjoin
from hashlib import md5
from shutil import copyfileobj
import numpy as np
import nibabel as nib
import tarfile
import zipfile
from dipy.core.gradients impo... |
99fa64dd3f0883dbec16b1f7b004e1f780c247d779dc4ec4f28854e6e621d975 | Python | 40,227 | 1,153 | """Utility functions for copying and archiving files and directory trees.
XXX The functions here don't copy the resource fork or other metadata on Mac.
"""
import os
import sys
import stat
import fnmatch
import collections
import errno
try:
import zlib
del zlib
_ZLIB_SUPPORTED = True
except ImportError:... |
9119ec02afd7dac4c560ecfb40b52aaaf89bda8121142b4e0600c2453d9a8fe2 | Python | 40,540 | 923 | from . import model
from .commontypes import COMMON_TYPES, resolve_common_type
from .error import FFIError, CDefError
try:
from . import _pycparser as pycparser
except ImportError:
import pycparser
import weakref, re, sys
try:
if sys.version_info < (3,):
import thread as _thread
else:
i... |
bc93e4d0c60a32e7baff83f1b72ac35ee8af54b1f4243a2540b7fa83ae959072 | Python | 40,834 | 1,088 | import numpy as np
from sklearn.base import RegressorMixin, BaseEstimator
from sklearn.externals import six
from sklearn.linear_model.base import LinearModel, LinearClassifierMixin
from sklearn.utils import check_X_y,check_array,as_float_array
from sklearn.utils.multiclass import check_classification_targets
from sklea... |
5e2cef9b4a036c514b9e6c935293b97f20b33b3421c67ddc4003f694d535065f | Python | 40,911 | 1,075 | from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from scipy.integrate import quad
from scipy.special import lpn, gamma
import scipy.linalg as la
import scipy.linalg.lapack as ll
from dipy.data import small_sphere, get_sphere, default_sphere
from dipy.core.geometry i... |
310d2ba65ffa80a57f5bf019d87250acbce8a5dc485699a468a43b374178525e | Python | 41,039 | 804 | # -*- coding: utf-8 -*-
"""
aid_img
some functions for image processing that are essential for AIDeveloper
---------
@author: maikherbig
"""
import numpy as np
import os, shutil,h5py
import pandas as pd
rand_state = np.random.RandomState(117) #to get the same random number on diff. PCs
import aid_bin
from... |
bb3e4eb2af604f374286ce29081eda2b73f4739ea8c7a58c931f977e08cc3365 | Python | 41,131 | 1,080 | """Rewrite assertion AST to produce nice error messages"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ast
import errno
import imp
import itertools
import marshal
import os
import re
import string
import struct
import sys
import types
import atom... |
7bc85620a2f718f995ba7272f7e0adab711f58cebe15e1188cca9cf851adbd31 | Python | 41,458 | 753 | """Generic execution around Limen's forked search, feedback and checkpoint core."""
import copy
import importlib
import importlib.util
import inspect
import json
import logging
import numbers
import random
import shutil
import signal
import sys
import threading
import time
import uuid
import warnings
from datetime impo... |
85dca38d93628cbae0fee18c9e71720beec61bf2f15adc01f01952dafbd50d0d | Python | 41,470 | 1,015 | #
# DEPRECATED: implementation for ffi.verify()
#
import sys, imp
from . import model
from .error import VerificationError
class VCPythonEngine(object):
_class_key = 'x'
_gen_python_module = True
def __init__(self, verifier):
self.verifier = verifier
self.ffi = verifier.ffi
self._... |
71e4688f9781f3f34122fe6619e06353747e2f0c802d782d4498fec166437efd | Python | 41,566 | 844 | import json
from pathlib import Path
from types import SimpleNamespace
import numpy as np
import pandas as pd
import pytest
from talos.experiment.checkpoint_manager import CheckpointManager
from talos.experiment.errors import NonPortableValueError
from talos.experiment.msq import MSQ
from talos.experiment.param_domai... |
434ee2c030f4151c166b67f1d99cd07edebd889b3d68d479d9fbebb54cb7118e | Python | 41,800 | 961 | import sys, types
from .lock import allocate_lock
from .error import CDefError
from . import model
try:
callable
except NameError:
# Python 3.1
from collections import Callable
callable = lambda x: isinstance(x, Callable)
try:
basestring
except NameError:
# Python 3.x
basestring = str
_un... |
fd69290f54897a5e60268bd5fb4bbc870f97bc3dc47daa6a9bda480041d31e7e | Python | 42,449 | 1,121 | import ctypes, ctypes.util, operator, sys
from . import model
if sys.version_info < (3,):
bytechr = chr
else:
unicode = str
long = int
xrange = range
bytechr = lambda num: bytes([num])
class CTypesType(type):
pass
class CTypesData(object):
__metaclass__ = CTypesType
__slots__ = ['__we... |
cfe116821c777a869725945764e14e6a356cfaedcd77a2667e2e30205f7dd840 | Python | 42,628 | 988 | from __future__ import division, print_function, absolute_import
import logging
import numpy as np
import os.path
from ast import literal_eval
from warnings import warn
import nibabel as nib
from dipy.core.gradients import gradient_table
from dipy.data import get_sphere
from dipy.io.gradients import read_bvals_bvecs... |
28b12f39f3f9c98a12138094ea7353dfa5d08fdc14855b30d8321b283104907e | Python | 42,748 | 1,054 | import warnings
from itertools import chain
from django.apps import apps
from django.conf import settings
from django.contrib.admin.utils import (
NotRelationField, flatten, get_fields_from_path,
)
from django.core import checks
from django.core.exceptions import FieldDoesNotExist
from django.db import models
from... |
e323a725663d4aaf59fa9dd4a1582cec73d6b79f79aa9501219e2f7e442ced9e | Python | 43,270 | 1,084 | """
Inference module for PCM toolbox with main functionality for model fitting and evaluation.
@author: jdiedrichsen
"""
import numpy as np
from numpy.linalg import solve, eigh, cholesky, cond
from numpy import sum, diag, log, eye, exp, trace, einsum
import pandas as pd
import PcmPy as pcm
from PcmPy.model import Inde... |
e3bd77f2dd834eded10049c3e01487d9318ef310ccd06d6d46afb6326a9149e2 | Python | 43,730 | 1,109 | # -*- coding: utf8 -*-
"""
Helper functions to plot dynamics, weight matrix and couple of other things
authors: András Ecker, Bence Bagi last update: 02.2019
"""
import os
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from helper import _avg_rate
sns.... |
7734b3f14d8d85f1891ff4a985ed89bc492df72dcce5834f09e548d585f45007 | Python | 44,142 | 1,355 | from typing import Type
import cv2
import numpy as np
import pytest
from albucore import to_float
from .aug_definitions import transforms2metadata_key
import albumentations as A
from tests.conftest import (
IMAGES,
RECTANGULAR_UINT8_IMAGE,
SQUARE_FLOAT_IMAGE,
SQUARE_MULTI_FLOAT_IMAGE,
SQUARE_MULT... |
25f6ae9fb30c4a36bb1f97462d95b5b55a158337862288d7d92a52fc1ffe92f3 | Python | 44,234 | 828 | """Caller SFD/CLI persistence contracts; parameter-only probes and real Iris data."""
import json
import subprocess
from pathlib import Path
import numpy as np
import pytest
from click.testing import CliRunner
from talos.cli.main import cli
from talos.yaml.compiler import CompiledSFD
from talos.yaml.config import rou... |
d3f85b59170f8a389d09f8aa9128235cf52ca053e91fd01407e5fb91e7f677a2 | Python | 44,302 | 1,235 | import math
from itertools import product
import random
import cv2
import numpy as np
import pytest
import albumentations as A
import albumentations.augmentations.geometric.functional as fgeometric
from albumentations.core.bbox_utils import denormalize_bboxes, normalize_bboxes
from tests.conftest import SQUARE_UINT8_... |
801580629e8ea65b6171dda7c3c8188ad9e129f44f7aa60e3f40b8e22fa5f21b | Python | 44,520 | 1,057 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This file is part of BORIS.
BORIS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the L... |
1098c5d346ec476b420e2a93fc0bab9b35da70876ca7bf97348176fdb97e110c | Python | 44,694 | 1,107 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This file is part of BORIS.
BORIS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the L... |
825e0bbe2610bbe0fcdeb44b9c5584b45b80bf0ae14898c7e08764baa532e1b8 | Python | 45,812 | 1,244 | '''This module implements specialized container datatypes providing
alternatives to Python's general purpose built-in containers, dict,
list, set, and tuple.
* namedtuple factory function for creating tuple subclasses with named fields
* deque list-like container with fast appends and pops on either end
* Cha... |
744cc3870a3381650a431009a99326a3ce91c6d518bc9ebdc72d1d94644bd1b7 | Python | 46,017 | 753 | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 11 07:16:35 2022
@author: llea4
"""
# %%
print('######################################################################')
print('###### Building the Models basic constances base on parameters #######')
print('################ & Features Extrtaction model with ##... |
34cc8742e5e2023530256e90cf293f7bd68062cea5f61109f5f048a7d1b0b49d | Python | 46,394 | 1,038 | # This code is © K. Heining, 2020, developed at the University of Freiburg.
# This code is made available under the BSD license enclosed with the software (see licence.txt).
# Over and above the legal restrictions imposed by this license, if you use this software for an academic
# publication then you are obliged to pr... |
9646f1961ec0798fc22e447831947aa433031dfd99c34cddf04ce5fed0dfbb47 | Python | 46,544 | 1,074 | """ Metrics for Symmetric Diffeomorphic Registration """
from __future__ import print_function
import abc
import numpy as np
import scipy as sp
from scipy import gradient, ndimage
from dipy.utils.six import with_metaclass
from dipy.align import vector_fields as vfu
from dipy.align import sumsqdiff as ssd
from dipy.al... |
4f35de5a29049982f59324076e8fff4a465da24476bb63263b65518905a25c93 | Python | 46,628 | 1,376 | """(disabled by default) support for testing pytest and pytest plugins."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import codecs
import gc
import os
import platform
import re
import subprocess
import sys
import time
import traceback
from fnmatch impo... |
0bbf32320681274013a6679aa8e8e989272e804ee6cfe1fc6020da2bc1fc97b8 | Python | 46,951 | 1,047 | from __future__ import annotations
import random
import numpy as np
from typing import Any, Literal
import pytest
import cv2
from albumentations.core.bbox_utils import BboxParams, BboxProcessor
from albumentations.core.keypoints_utils import KeypointParams, KeypointsProcessor
from albumentations.augmentations.mixing... |
2fd13da01939bcf5f07cbff34a38b9af412c28119b8030fdd76e4ce96538084f | Python | 47,103 | 1,056 | # This code is © K. Heining, 2020, developed at the University of Freiburg.
# This code is made available under the BSD license enclosed with the software (see licence.txt).
# Over and above the legal restrictions imposed by this license, if you use this software for an academic
# publication then you are obliged to pr... |
7db7ee7c26c00b60e8ea902372c0cb24df9886b33d8aef3a5d798b00342ed272 | Python | 47,406 | 931 | #!/usr/bin/env python3
"""
Synthetic tests of analyze.py: worlds of records with known answers. No simulation is run; every record is written by
hand so that each verdict, gate and working-point rule can be checked at its edge.
Usage: python3 -I test_analyze.py (exit code 0 when every test passes)
"""
from __... |
8dfdf6368a6fa20be0bf5c8ede08d193a67a0aa1a00d645d5a4592de2fdeaadb | Python | 47,472 | 1,465 | ###############################################################################
# base.py provide the base class for recording, all modules must inherit from
# this base class
###############################################################################
# Copyright (c) 2019-2020, University of Liège
# Author: Nikita ... |
3281330dfc3ea68f29fe4114c234510004e9b94a09f2150cf8185b14754aa34c | Python | 47,804 | 1,270 | # -*- coding: utf-8 -*-
"""
celery.concurrency.asynpool
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
This module will be moved soon, so don't use it directly.
Non-blocking version of :class:`multiprocessing.Pool`.
This code deals with three major challenges:
1) Starting up child proces... |
610e6f92b35de1b654ad90ee289166eaef4f2257c6de0f046083e0626fa42128 | Python | 48,045 | 1,238 | """Geometric distortion transforms for image augmentation.
This module provides various geometric distortion transformations that modify the spatial arrangement
of pixels in images while preserving their intensity values. These transforms can create
non-rigid deformations that are useful for data augmentation, especia... |
96ce30017cf236e50a3df7bdb57e7a4c65bb758458b0e615b1bb5e206d300ee0 | Python | 48,176 | 434 | # -*- coding: utf-8 -*-
"""
aid_start.py
some functions that I want to keep separate to make the main script a bit shorter
---------
@author: maikherbig
"""
import os,shutil,json
def banner():
#generated using: https://www.ascii-art-generator.org/
text = """
_____ _____
/\ ... |
bc7328fbc6081d298c62dd6de6a4596accdee2e088f6fddf968d98a9bda3a1f8 | Python | 48,289 | 1,091 | import os
import json
import re
from collections import defaultdict
from io import open
from functools import reduce, partial
from itertools import chain
import copy
from bids_validator import BIDSValidator
from ..utils import listify, natural_sort, check_path_matches_patterns
from ..external import inflect, six
from ... |
543ed363496949b90202360cc100067fa3a42cf5656896374349cfbbb4956337 | Python | 48,759 | 1,245 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Code parsing for coverage.py."""
import ast
import collections
import os
import re
import token
import tokenize
from coverage import env
from coverage.backward... |
35dfb1ec69584716eeadd15327ea564aea393743b4cf2a957339911c7e69bacc | Python | 48,957 | 1,102 | # coding=utf-8
# from django.shortcuts import render
import re
import csv
import datetime
from csv import reader
from io import StringIO
from itertools import chain
from operator import itemgetter
from django.contrib import messages
from django.contrib.admin.utils import flatten
from django.contrib.auth.decorators i... |
f0804efad08573516f3f946ce09bb6d8114d5090a91a40dc635715cc53efef28 | Python | 49,078 | 946 | import os
import shutil
import sys
import tempfile
import json
import zipfile
from json import JSONDecodeError
from os import path
from functools import reduce
from operator import or_
import networkx as nx
from django.conf import settings
from django.core.files import File
from django.core.management import call_com... |
f8f82d388809b478b3280250745f6b2d0f380dc8405404f224bbfe05667d87ff | Python | 49,199 | 1,100 | # -*- coding: utf-8 -*-
"""
aid_dl
functions to adjust and convert deep neural nets
grad_cam
LearningRateFinder
---------
@author: maikherbig
"""
import os, shutil,gc,tempfile
import numpy as np
import pandas as pd
rand_state = np.random.RandomState(117) #to get the same random number on diff. PCs
import t... |
92a5864fffb4516487595baeacd0e30af5f2bba3a235bbc39bc8d3f4c8bf4f74 | Python | 49,213 | 1,301 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Core control stuff for coverage.py."""
import atexit
import inspect
import itertools
import os
import platform
import re
import sys
import time
import tracebac... |
90da1b1ccf505bbedbcec0fce67275dbdea51a806f066a1d1aef899cf5a8964b | Python | 49,959 | 1,610 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import abc
import datetime
import hashlib
import ipaddress
from enum impo... |
f88118db34507156d3204c00368ba14c88c884e45f17ada8855da1fc45cd0ee3 | Python | 50,312 | 1,039 | #!/usr/bin/env python3
"""
MAG-S3b - non-reciprocity of CISS, order of cryptochromes and the inverse problem. Protocol version 0.4 (draft).
Pair. The pair of MAG-S2 v0.1.2 (flavin anion with N5 and N10, tryptophan cation with N1, anisotropic tensors from
RadicalPy 1.0.9, 50 uT, J = D = 0) with the kinetics of the MA... |
acae6b5519acbc265358f510a558d3971ae3b96c11e5ece9b4cbe381adbbab6e | Python | 50,568 | 1,321 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import inspect
import itertools
import sys
import warnings
from collections import defaultdict
from collections import deque
from collections import OrderedDict
import attr
import py
import si... |
a4ccb7d086e43176be970e4409c2db46a9981562869d1c5b93fd9d2905f264de | Python | 51,278 | 1,210 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your ... |
147d11f21c005d5db84e1365421eba99f83efbdbdb6f013cf60e2f1812a4fe87 | Python | 52,087 | 1,139 | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 15 08:39:57 2021
@author: MaikH
"""
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtWidgets, QtGui
import os, sys
import numpy as np
rand_state = np.random.RandomState(13) #to get the same random number on diff. PCs
import traceback
import cv2
... |
2220cd2360fca1b7372c7dc937767410f29dab9e562b417f533bb7e46aa01721 | Python | 52,125 | 1,137 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This file is part of BORIS.
BORIS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the L... |
1ae9ba6a78dfc3bb8cc5103c4a8045d6c8082d6711f49c8e7f1089c11fe59121 | Python | 52,285 | 1,257 | # -*- coding: utf-8 -*-
"""
aid_bin
some useful functions that I want to keep separate to
keep the backbone script shorter
---------
@author: maikherbig
"""
import os,shutil,json,re,urllib
import numpy as np
import h5py,time,datetime
import hdf5plugin
import six,tarfile, zipfile
import hashlib
import wa... |
58be5e28af20a149ed8188000fd13db5884d088820e4611ebaa04ea029676cf2 | Python | 54,328 | 1,263 | from __future__ import print_function
import warnings
import types
import numpy as np
from numpy.linalg import norm
import numpy.testing as npt
from dipy.testing.memory import get_type_refcount
from dipy.testing import assert_arrays_equal
from dipy.testing import assert_true
from numpy.testing import (assert_array_e... |
97c86a816e2e543c5b712d432181fe268d8b9e0e947727cdc0fa0ec803dc6892 | Python | 54,487 | 1,443 | """Core implementation of path-based import.
This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public... |
305b638f689b5c944c916e9413c9a848e389e6318b05b7374f5641fdf3e9b3b5 | Python | 54,625 | 1,599 | ###############################################################################
# base.py provide the base class for recording, all modules must inherit from
# this base class
###############################################################################
# Copyright (c) 2019-2020, University of Liège
# Author: Nikita ... |
f1eb9c6a347ffb719fd69d0310584bf204816db9568989cb86d9f81ca03b5a56 | Python | 54,961 | 1,480 | """ Python test discovery, setup and run of test functions. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import fnmatch
import inspect
import os
import sys
import warnings
from functools import partial
from textwrap import dedent
i... |
e858ad24d6a186c0bab8df49e5985345385ee45581252ac3d6e57d6aa42d0713 | Python | 55,635 | 1,581 | """Main processing pipeline."""
import ast
import logging
from collections.abc import Sequence
from json import JSONDecodeError
from pathlib import Path
from typing import Any, Literal, cast
import cv2
import keras
import netCDF4 as nc # ruff: ignore[camelcase-imported-as-lowercase]
import numpy as np
import numpy.t... |
8469588161a7df148ef1144851cc59a0642862ab1f761d730ac473b540f5b7b1 | Python | 56,248 | 2,739 | import os
import numpy as np
import pandas as pd
from pytraction.process import calculate_traction_map
def test_matlab():
meshsize = 10 # grid spacing in pix
pix_per_mu = 1.3
E = 10000 # Young's modulus in Pa
s = 0.3 # Poisson's ratio
df = pd.read_csv(os.path.join("tests", "d... |
1a703157b4ef643f72025932510c05c93622ffe0cd668cac4dbe9bb2a4e7b9fb | Python | 56,298 | 1,163 | # -*- coding: utf-8 -*-
"""
aid_img
some functions for image processing that are essential for AIDeveloper
---------
@author: maikherbig
"""
import numpy as np
import os, shutil,h5py
import hdf5plugin
import pandas as pd
rand_state = np.random.RandomState(117) #to get the same random number on diff. PCs
i... |
df9edb6e1f83e2ac891e81ffcbbb4372d145d48f33c8df7aea00fa8d51ce6469 | Python | 56,596 | 1,422 | """Module containing 3D transformation classes for volumetric data augmentation.
This module provides a collection of transformation classes designed specifically for
3D volumetric data (such as medical CT/MRI scans). These transforms can manipulate properties
such as spatial dimensions, apply dropout effects, and per... |
62a2118c9fce5b846f757d3389ba84ee759f9d3290873398f4b8190b32c9ec83 | Python | 56,622 | 1,556 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from citeproc.py2compat import *
import re
import unicodedata
import sys
from functools import reduce, cmp_to_key
from operator import itemgetter
from lxml import etree
from . import NAMES, DATES, NUMBERS
fr... |
a4df49e2a61badb2073b9ab22a14c089979ac39c324c7c4d19a177922a0fd2b5 | Python | 57,682 | 1,580 | # -*- coding: utf-8 -*-
"""
This module offers a generic date/time string parser which is able to parse
most known formats to represent a date and/or time.
This module attempts to be forgiving with regards to unlikely input formats,
returning a datetime object even for dates which are ambiguous. If an element
of a dat... |
d80dc9d4c0984cef037550688b7960228ae10b20b31734b47195159ff9a6660e | Python | 57,765 | 1,693 | """Data manipulations and input/output operations."""
import logging
import re
from collections import defaultdict
from collections.abc import Callable, Iterator, Sequence
from pathlib import Path
from typing import Any, Literal, TypedDict, Unpack, cast, overload
import cv2
import keras
import numpy as np
import nump... |
6b98bb584238a26c0d9b139beabc19d7a685344d1009573ee6a784f8ba097da1 | Python | 57,789 | 1,872 | from __future__ import annotations
import random
from functools import partial
from typing import Any
import cv2
import numpy as np
import pytest
from albucore import to_float, clip, MAX_VALUES_BY_DTYPE
import albumentations as A
import albumentations.augmentations.pixel.functional as fpixel
import albumentations.aug... |
e52fd2d311f9a40ff31064b15f7cbd2de675603bed4bb0374fa82e3a595bf309 | Python | 57,916 | 1,246 | """ Affine image registration module consisting of the following classes:
AffineMap: encapsulates the necessary information to perform affine
transforms between two domains, defined by a `static` and a `moving`
image. The `domain` of the transform is the set of points in the
`static` image'... |
29018c2dc7ea2cf82e6cc24255f22857d7880ed28617d03f5a067f6491a22dc6 | Python | 58,538 | 1,464 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This file is part of BORIS.
BORIS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the L... |
1df703af63a2af71a94385d33276ad39a422e9abaa040fdf4bcb618344e1f350 | Python | 58,910 | 1,216 | #!/usr/bin/env python3
"""
MAG-S3 - what an experiment needs to see the shape of the quantum compass. Protocol version 0.4 (draft).
The bird is the bird of MAG-S2 (release v0.1.2, DOI 10.5281/zenodo.24030614): two lateral eyes, 400 receptor patches,
cryptochrome axes along the receptor axes, neurons reading Gaussian... |
7fe2db128d6cff6ee6a210f14f4fea7b69b08e96e663936a8b91f7b0f85fcea1 | Python | 59,588 | 1,831 | """
BORIS
Behavioral Observation Research Interactive Software
Copyright 2012-2026 Olivier Friard
This file is part of BORIS.
BORIS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the L... |
7165be5fe53e52ada2e3486caffa9d7fdaa4643b7c17f5b985f920bc31d44b6b | Python | 60,085 | 1,532 | # -*- coding: UTF-8 -*-
import datetime
from os import path
from django.db import models
from django.core.exceptions import ValidationError
from django.core.validators import MinValueValidator
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from simple_history.model... |
54a670dccf4bf6b18017bdbb9d0567f97dfc53a6e944cb38238bab429282a9c7 | Python | 60,830 | 1,550 | # coding=utf-8
import datetime
import re
from functools import partial
from operator import itemgetter
from django.contrib import messages
from django.contrib.auth import PermissionDenied
from django.contrib.auth.decorators import login_required, permission_required
from django.urls import reverse
from django.db.mode... |
99d218618d7e87c3a9718b53fabab5e62e86a0ec5046e51cf3bf4a42bf1df186 | Python | 61,559 | 1,399 | # coding=utf-8
from django.contrib.auth.models import User
from django.forms import ModelForm, TextInput, Textarea, Select, DateInput, TypedChoiceField, RadioSelect, \
ValidationError, Form, IntegerField, NumberInput, TimeInput, URLInput, ModelChoiceField
from django.shortcuts import get_object_or_404
from django.... |
83db73429237072292fb6d638d28f505ed9f0296ff267240566014f0221e9dce | Python | 62,362 | 162 | ROOTED_PHYLOMES = {1: {'CANAL': 13, 'CANGA': 13, 'PLAFA': 14, 'PLAYO': 14, 'ENCCU': 13, 'XENTR': 8, 'TETNG': 9, 'GUITH': 14, 'YEAST': 13, 'SCHPO': 13, 'CANFA': 5, 'RAT': 4, 'YARLI': 13, 'NEUCR': 13, 'MONDO': 6, 'DANRE': 9, 'MOUSE': 4, 'CAEEL': 12, 'BOVIN': 5, 'CRYNE': 13, 'ARATH': 14, 'PARTE': 14, 'ASHGO': 13, 'GIBZE':... |
fab0949f88c76fb427af258293aa261c462bfcea0e801e90e1e0ed3092e1d64d | Python | 62,446 | 1,836 | # -*- coding: utf-8 -*-
"""
This module offers timezone implementations subclassing the abstract
:py:class:`datetime.tzinfo` type. There are classes to handle tzfile format
files (usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`,
etc), TZ environment string (in all known formats), given ranges (with h... |
2c6aa3ec63eeab82881b86b1acde46d0ecba6069ab2db040d1b1c4fa30a5e8ea | Python | 62,711 | 1,542 | import os, sys, io
from . import ffiplatform, model
from .error import VerificationError
from .cffi_opcode import *
VERSION_BASE = 0x2601
VERSION_EMBEDDED = 0x2701
VERSION_CHAR16CHAR32 = 0x2801
class GlobalExpr:
def __init__(self, name, address, type_op, size=0, check_value=0):
self.name = name
s... |
d99a8121f4df62f5b179fbd81b3ac19323cd67104ebb0acab44da7384a420ae1 | Python | 63,156 | 1,392 | # -*- coding: utf-8 -*-
import json
import shutil
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.core import serializers
from django.urls import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.sho... |
418c74671307f7043af20b6b5e74ba352b7189202b7c2f204dff1aafe2351c0e | Python | 63,755 | 1,493 | """ Classes and functions for Symmetric Diffeomorphic Registration """
from __future__ import print_function
import abc
from dipy.utils.six import with_metaclass
import numpy as np
import numpy.linalg as npl
import scipy as sp
import nibabel as nib
from dipy.align import vector_fields as vfu
from dipy.align import fl... |
9ae9eef12ccea2e49852c18aa820644951e0ea3f2d14a4dfdf1a0cd213206689 | Python | 64,066 | 1,959 | # -*- coding: utf-8 -*-
#
# Module providing the `Pool` class for managing a process pool
#
# multiprocessing/pool.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
from __future__ import absolute_import
#
# Imports
#
import errno
import itertools
import os
import platform
i... |
d76ac8e284126729887b1e56c2770686ab3e62f78383ce38941b2afbbec153cb | Python | 64,630 | 1,633 | """Transform classes for applying various blur operations to images.
This module contains transform classes that implement different blur effects including
standard blur, motion blur, median blur, Gaussian blur, glass blur, advanced blur, defocus,
and zoom blur. These transforms are designed to work within the albumen... |
40a45f04a9261793cf61e6563f720173a3efcb3b07af032decfefde7d78affb8 | Python | 66,102 | 1,858 | #
# The Python Imaging Library.
# $Id$
#
# TIFF file handling
#
# TIFF is a flexible, if somewhat aged, image file format originally
# defined by Aldus. Although TIFF supports a wide variety of pixel
# layouts and compression methods, the name doesn't really stand for
# "thousands of incompatible file formats," it jus... |
5b2ca2f4dcf1dcbb6771ad16ffe91cb3d373d47e45d72be853a719b0a0a71179 | Python | 66,217 | 1,694 | import coreapi
import os
from csv import reader
from datetime import date, timedelta
from io import StringIO
from os import path
from django.conf import settings
from django.utils import translation
from .models import Experiment, Group, Subject, User, EEGSetting, \
EMGSetting, TMSSetting, ContextTree, \
Co... |
10761dc9cef6ddbe2fb4386fde1c532afb9de6b671d1923e7964ddee8438990e | Python | 66,546 | 1,736 | # -*- coding: utf-8 -*-
"""
The rrule module offers a small, complete, and very fast, implementation of
the recurrence rules documented in the
`iCalendar RFC <https://tools.ietf.org/html/rfc5545>`_,
including support for caching of results.
"""
import itertools
import datetime
import calendar
import re
import sys
try:... |
a8b6c34eccbe21fd87b9c04aa44e3943753868f3494f3e7b515d03d8b2b3a748 | Python | 66,780 | 2,060 | #!/usr/bin/python
""" Classes and functions for fitting tensors """
from __future__ import division, print_function, absolute_import
import warnings
import functools
import numpy as np
import scipy.optimize as opt
from dipy.utils.six.moves import range
from dipy.utils.arrfuncs import pinv, eigh
from dipy.data impo... |
7512e6ec74d34f1b834981f8846bddeeef3a78b4190c0e01d91449fa4db158e5 | Python | 66,933 | 1,778 | # -*- coding: utf-8 -*-
"""
babel.dates
~~~~~~~~~~~
Locale dependent formatting and parsing of dates and times.
The default locale for the functions in this module is determined by the
following environment variables, in that order:
* ``LC_TIME``,
* ``LC_ALL``, and
* ``LANG``
... |
ce1bc1c07b32e4208bb93cdcd7b42c7faa05e2e7f61f37ef8c46652380a45034 | Python | 67,824 | 1,739 | import numpy as np
from numpy.testing import (assert_array_equal,
assert_array_almost_equal,
assert_almost_equal,
assert_equal,
assert_raises)
from scipy.ndimage.interpolation import map_coordinates
from nibabel.... |
6ded4f9b347c10319f540d82c7a963b1322e5d1c56dad1163e94eab505dd7b46 | Python | 68,317 | 2,086 | from __future__ import absolute_import, division, print_function
import copy
import hashlib
import linecache
import sys
import threading
import warnings
from operator import itemgetter
from . import _config
from ._compat import (
PY2,
isclass,
iteritems,
metadata_proxy,
ordered_dict,
set_clos... |
dd91f3bdea0375ef4929613eef01fe550fb728cb3bb258db0ea5913df61f472f | Python | 70,155 | 1,964 | from __future__ import annotations
import typing
from unittest import mock
from unittest.mock import MagicMock, Mock, call, patch
import warnings
import torch
import cv2
import numpy as np
import pytest
from typing import Any
import albumentations as A
from albumentations.core.bbox_utils import check_bboxes
from albu... |
d2b80aa537bda4f466c373ef2aa5e74caaf4666fe0552f0698749aa30ba3fc80 | Python | 74,816 | 1,746 | # This code is © K. Heining, 2020, developed at the University of Freiburg.
# This code is made available under the BSD license enclosed with the software (see licence.txt).
# Over and above the legal restrictions imposed by this license, if you use this software for an academic
# publication then you are obliged to pr... |
abc14b70366c6a00464917b963d1e2fc51af01e66fbac35fa0ee4492191243c6 | Python | 75,305 | 1,856 | import errno
import inspect
import os
import sys
from contextlib import contextmanager
from itertools import repeat
from functools import update_wrapper
from .types import convert_type, IntRange, BOOL
from .utils import PacifyFlushWrapper, make_str, make_default_short_help, \
echo, get_os_args
from .exceptions im... |
29cc4c155ac29b419cba44b8d101277f506c3cfe466b8464d824024c931a4f43 | Python | 76,125 | 1,962 | """Geometric transformation classes for image augmentation.
This module provides a collection of transforms that modify the geometric properties
of images and associated data (masks, bounding boxes, keypoints). Includes implementations
for flipping, transposing, affine transformations, distortions, padding, and more c... |
11fcc81e33db81ec06e30dec984b6a1143d9a15c1898c4242f843c6725be6b9f | Python | 76,410 | 2,016 | # -*- coding: utf-8 -*-
# vim: ts=4 sw=4 et
#
# Python MPV library module
# Copyright (C) 2017-2020 Sebastian Götte <code@jaseg.net>
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free Software Foundation, either... |
23310411da909c474d17845d22c180afa7ecff8ac8957b3a053e96e84829d3fa | Python | 76,503 | 1,885 | """Module for composing multiple transforms into augmentation pipelines.
This module provides classes for combining multiple transformations into cohesive
augmentation pipelines. It includes various composition strategies such as sequential
application, random selection, and conditional application of transforms. Thes... |
38a8c7ec98abb176559bd82ba63b6d6e5add98546b6b8e9cc0cb406e6c142007 | Python | 76,587 | 2,071 | # -*- coding: utf-8 -*-
import numpy as np
from dipy.reconst.multi_voxel import multi_voxel_fit
from dipy.reconst.base import ReconstModel, ReconstFit
from dipy.reconst.cache import Cache
from scipy.special import hermite, gamma, genlaguerre
try: # preferred scipy >= 0.14, required scipy >= 1.0
from scipy.special ... |
9943da1be804d08fb200f01772e8ca8f1eda75fa2e16703a78a20dcd1c2fe64d | Python | 77,190 | 2,100 | #!/usr/bin/python
""" Classes and functions for fitting the diffusion kurtosis model """
from __future__ import division, print_function, absolute_import
import numpy as np
import scipy.optimize as opt
import dipy.core.sphere as dps
from dipy.reconst.dti import (TensorFit, mean_diffusivity,
... |
c6e3c1b46aa165d32996193689290fc0fa87fea20b023aa6098e8fe7644f1b20 | Python | 77,304 | 1,731 | """Locale support module.
The module provides low-level access to the C lib's locale APIs and adds high
level number formatting APIs as well as a locale aliasing engine to complement
these.
The aliasing engine includes support for many commonly used locale names and
maps them to values suitable for passing to the C l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.