sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
b2769d9fb0d647564d4f492ba271f1bed298e5a3906eb324bc12dac5b77355e6 | Python | 8,486 | 262 | import wave
import numpy as np
import pyqtgraph as pg
from PySide6.QtCore import QEvent, Qt, Signal
from PySide6.QtGui import QCloseEvent
from PySide6.QtWidgets import QHBoxLayout, QLabel, QPushButton, QVBoxLayout, QWidget
from . import config as cfg
class Plot_waveform_RT(QWidget):
# Send keypress events to ma... |
9527e8fac56dfdfeab3e340d355ee1435c0d1a084ce525b0ced3bfb9b71bc79f | Python | 8,490 | 320 | from __future__ import absolute_import
import errno
import socket
import time
from itertools import cycle
from celery.five import items, range
from celery.utils.functional import noop
from celery.tests.case import AppCase, Mock, SkipTest, call, patch
try:
from celery.concurrency import prefork as mp
from cel... |
fe419b917ccb06fb1d8380d78412756f62e6fb1b15fc3f4f1d2fac56c8f18cd0 | Python | 8,512 | 226 | import SimpleITK as sitk
import numpy as np
import torch
import cv2
import tkinter as tk
from tkinter import messagebox
from PIL import Image, ImageTk
#from torchmetrics import Dice, JaccardIndex
from monai.metrics import HausdorffDistanceMetric
from brainCT.train_utils.metrics import DiceScore
import os
from display_g... |
7e1d446e32803b082a44ae24407c3d4e05c51f7a3eb4274fa6613cbb0106e45c | Python | 8,515 | 258 | """
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... |
84a13ed1c20c1bc1f5ffdd47f62d9f078df427b8a2f87d96cd34b7ab9d5c762b | Python | 8,527 | 260 | from __future__ import absolute_import
import socket
from celery.events import Event
from celery.tests.case import AppCase, Mock
class MockProducer(object):
raise_on_publish = False
def __init__(self, *args, **kwargs):
self.sent = []
def publish(self, msg, *args, **kwargs):
if self.rai... |
3b2e08591c2ea7f5cd64c2ba77cce987c63c155123ebe78456e5890b123e8b37 | Python | 8,538 | 214 | from ctypes import byref, c_double
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope
from django.contrib.gis.gdal.error import GDALException, SRSException
from django.contrib.gis.gdal.feature import Feature
from django.contrib.gis.gdal.field import OGR... |
ba0ce674ff1b163e2adcd36d5596ebeea4da625b2c9d7aaae6ae6e36949e8805 | Python | 8,562 | 216 | #!/usr/bin/env python
"""
Do windowed detection by classifying a number of images/crops at once,
optionally using the selective search window proposal method.
This implementation follows ideas in
Ross Girshick, Jeff Donahue, Trevor Darrell, Jitendra Malik.
Rich feature hierarchies for accurate object detection... |
0cfdd4be0d3060c9a09b142e4b5c255fe3ec2b539579fa1878f1d732318aa83e | Python | 8,575 | 189 | import numpy as np
import pandas as pd
from collections import Counter
## read mastersheet
#df = pd.read_excel('mastersheet_reformatted.xlsx', sheet_name='Dataset_full')
df = pd.read_excel('mastersheet_combined_reformatted.xlsx', sheet_name='Dataset_full')
# rename columns
df = df.rename(columns={k:k.strip() for k in... |
b2f2be5550e0ccc85a699ba39bcc7759ba2bdbae793d7812c4133ad2c39b4a94 | Python | 8,579 | 176 | #! /usr/bin/python3.7
# -- coding: utf-8 -- **
import sys
import os
import time
import nibabel as nib
import numpy as np
from surfer import Brain
import matplotlib
matplotlib.use("Qt5Agg")
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from matplot... |
9711eaa98b99b9ec8fd6d4dbc8ecbe71ee096dabbbdae5325ea93ce334bf1f95 | Python | 8,607 | 222 | #!/usr/bin/env python2
desc="""Calculate paternal expression.
CHANGELOG:
1.0b
- recognise the introns properly
1.0a
-
"""
epilog="""Author:
l.p.pryszcz+git@gmail.com
Warsaw, 17/11/2015
"""
import argparse, os, re, sys
from datetime import datetime
import subprocess
import numpy as np
read_start_pat = re.compile('\... |
917053e241a3581aa6615534045accc4ccaa91d3de523808afe4c6a791ef092d | Python | 8,617 | 218 | from calendar import timegm
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
from django.http import Http404, HttpResponse
from django.template import TemplateDoesNotExist, loader
from django.utils i... |
971d5fcae26be5cfdc2c9164fe5889cc4e3d397aed4510ce23d819aae54e4a81 | Python | 8,617 | 204 | from django.conf import settings
from django.contrib import admin, messages
from django.contrib.admin.options import IS_POPUP_VAR
from django.contrib.admin.utils import unquote
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.forms import (
AdminPasswordChangeForm, UserChangeForm, U... |
e601ba5411beb580104fa9569e3bc7447f91bc84ad69e1bf3f18723cb9cbf8a4 | Python | 8,628 | 288 | # coding: utf-8
"""
Functions to convert unicode IRIs into ASCII byte string URIs and back. Exports
the following items:
- iri_to_uri()
- uri_to_iri()
"""
from __future__ import unicode_literals, division, absolute_import, print_function
from encodings import idna # noqa
import codecs
import re
import sys
from ... |
b953ec1dd394d781923d93cb03a498d89514a3bf4696d7d4155cb53a57dcedf3 | Python | 8,655 | 282 | from __future__ import absolute_import
from datetime import timedelta
from pickle import loads, dumps
from celery import signature
from celery import states
from celery import group
from celery import uuid
from celery.datastructures import AttributeDict
from celery.exceptions import ImproperlyConfigured
from celery.... |
eac37dac070f613aa2ef3244e0a2256a61bb7de4c58a2b3e55bd3fd190a6925d | Python | 8,669 | 238 | from __future__ import annotations
import pytest
import numpy as np
from albumentations.augmentations.transforms3d import functional as f3d
@pytest.mark.parametrize(
"input_shape,n_channels", [
((3, 3, 3), None), # 3D case
((3, 3, 3, 2), 2), # 4D case
]
)
def test_uniqueness(input_shape: tup... |
29ef738f9be19939d5007a653a189e73c0790fadbfb72df43c364417ff0b15c9 | Python | 8,688 | 264 | # -*- coding: utf-8 -*-
"""
celery.backends.mongodb
~~~~~~~~~~~~~~~~~~~~~~~
MongoDB result store backend.
"""
from __future__ import absolute_import
from datetime import datetime
from kombu.syn import detect_environment
from kombu.utils import cached_property
from kombu.utils.url import maybe_sanitize_u... |
926c5c56df43846ba3410fbb0732e816706451abb7fed4c0b142797357841314 | Python | 8,703 | 224 | #!/usr/bin/env python2
desc="""Report genes with evidence of isoform switching.
For each gene, number of transcripts, cumulative expression,
major isoforms for each condition and each major isoform are reported.
Lowly expressed genes in given condition are coded with `0` (--TPM < 1),
while genes without clear major is... |
cb2bfc48ad7b9b9c9a2adb6d2f29a74219beab11ccc2856ff92122af78461bc3 | Python | 8,712 | 153 | """Builds notebooks/MAG-S3b_colab.ipynb (author's harness, not part of the study). The code, requirements.txt and the
reference calibration go into the notebook as a base64 tar.gz together with their SHA-256, so the notebook needs no
upload; its first cell refuses to go on when a file differs. The notebook is rebuilt f... |
b4d15f001ce023a07f62d5739334c3e101dc499377e6c9fd12c292e1803987d7 | Python | 8,720 | 249 | ###############################################################################
## Vision Research Laboratory and ##
## Center for Multimodal Big Data Science and Healthcare ##
## University of California at Santa Barbara ##
... |
6088bea2e36d276f7b5fd57bcd92db09d934e609d787ce895b58eb94a74523de | Python | 8,721 | 260 | ###############################################################################
# BIDSme is a toolkit for bidsification of multy-modal neural imagery dataset
###############################################################################
# Copyright (c) 2019-2020, University of Liège
# Author: Nikita Beliy
# Owner: Lie... |
899b1ad16e1be88c7febc9c82fec022752e86e8b17af21945aef9e9c9a8000fd | Python | 8,727 | 250 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) according to PEP 3119."""
from _weakrefset import WeakSet
def abstractmethod(funcobj):
"""A decorator indicating abstract methods.
Requires that the metaclass is ABCMeta or de... |
cc576ed8f0f75e9e5527796b2ce1c4e8505d70d8cf30a87a7ff3b5798c1262b7 | Python | 8,729 | 207 | #!/usr/bin/env python3
"""Test-suite runtime gate: preserve the measured ceiling and profile slow tests.
Budgets live in `.github/budgets.json`. Raising a ceiling requires an explicit
PR-body marker. Metadata edits revalidate that marker without rerunning tests;
source checks still require the measured suite profile a... |
13cc864217ed3dbe1a6f4d923af929eab422cc54f1b0ab6c4d52a9fadea871bb | Python | 8,749 | 315 | #
# The Python Imaging Library
# $Id$
#
# map CSS3-style colour description strings to RGB
#
# History:
# 2002-10-24 fl Added support for CSS-style color strings
# 2002-12-15 fl Added RGBA support
# 2004-03-27 fl Fixed remaining int() problems for Python 1.5.2
# 2004-07-19 fl Fixed gray/grey spelling issues
# 2... |
6407ffcb9c0d1f2ab645d9629ff7f0a65427536bb9c199ef99826ad4975d3ed3 | Python | 8,750 | 282 | """
Commonly useful validators.
"""
from __future__ import absolute_import, division, print_function
from ._make import _AndValidator, and_, attrib, attrs
__all__ = ["and_", "in_", "instance_of", "optional", "provides"]
@attrs(repr=False, slots=True, hash=True)
class _InstanceOfValidator(object):
type = attri... |
0a43c7c9451bab664bd2057b6bc2a4b3b93a719af81170a27a6a4860ca69faab | Python | 8,752 | 206 | import numpy as np
from dipy.tracking import utils
from dipy.tracking.propspeed import eudx_both_directions
from dipy.data import get_sphere
class EuDX(object):
"""Euler Delta Crossings
Generates tracks with termination criteria defined by a delta function [1]_
and it has similarities with FACT algorit... |
f8361cf613921f8a0240582ae5a6637c195c22d2e7c4393aac65a99c7a49e681 | Python | 8,768 | 220 | """
module for testing project_functions.py
pytest -s -vv test_project_functions.py
"""
import pytest
import os
import sys
import json
import tablib
from decimal import Decimal
from pathlib import Path
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from boris import project_func... |
7551a3e2762ef72bf215906f708bb06a09d05fadcb3ee3e884490553cca0ee20 | Python | 8,775 | 198 |
import ismrmrd
import os
import itertools
import logging
import numpy as np
import numpy.fft as fft
import base64
import re
import mrdhelper
# Folder for debug output files
debugFolder = "/tmp/share/debug"
def process(connection, config, metadata):
logging.info("Config: \n%s", config)
# Metadata should be M... |
be6412e27d2d517c0031a1e6604fea5344d5e19d98dabea895e8dc7f782c1907 | Python | 8,801 | 311 | # -*- coding: utf-8 -*-
"""
babel.util
~~~~~~~~~~
Various utility classes and functions.
:copyright: (c) 2013-2018 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
import codecs
from datetime import timedelta, tzinfo
import os
import re
import textwrap
from babel._compat import... |
05ba985235986d142dccc0bc33efe3b880c0f4123df613633f6e3fa578495266 | Python | 8,805 | 201 | """
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... |
d32ea4315ff7e55ab856ff8857bc1cdb7e1583a594f56506cbcd30971b33d29e | Python | 8,809 | 202 | """
Management utility to create superusers.
"""
import getpass
import sys
from django.contrib.auth import get_user_model
from django.contrib.auth.management import get_default_username
from django.contrib.auth.password_validation import validate_password
from django.core import exceptions
from django.core.management.... |
0bd0ac366c7f57207753667073cdde2240c00f9d1d24de9ac960ee9142bd6fad | Python | 8,814 | 323 | # -*- coding: utf-8 -*-
"""
celery.utils.functional
~~~~~~~~~~~~~~~~~~~~~~~
Utilities for functions.
"""
from __future__ import absolute_import
import sys
import threading
from functools import wraps
from itertools import islice
from kombu.utils import cached_property
from kombu.utils.functional import... |
ecc0fc9a1bcb9277c083197dbd5f3502deb14cc17313224025ff80ded21adda1 | Python | 8,814 | 277 | ###############################################################################
# _run.py defines Run class that manages individual runs from which bidsmap
# is constructed
###############################################################################
# Copyright (c) 2019-2020, University of Liège
# Author: Nikita Bel... |
8fb9475ad4b1f770717b6d21b48c1ccbcc67e8acacff8c9b22c4abe4eda2f618 | Python | 8,815 | 313 | """Generic (shallow and deep) copying operations.
Interface summary:
import copy
x = copy.copy(y) # make a shallow copy of y
x = copy.deepcopy(y) # make a deep copy of y
For module specific errors, copy.Error is raised.
The difference between shallow and deep copying is only relev... |
8792ddf51dc09a3ae1d1c580fe3c36af78aebdda5b159e9cafa5180dbe795bb0 | Python | 8,819 | 237 | import itertools
import os
import sys
sys.path.append(os.path.join(sys.path[0], '../'))
import numpy as np
import argparse
import time
import logging
import torch
import torch.nn as nn
import torch.optim as optim
from sklearn.model_selection import RepeatedStratifiedKFold
import torch.utils.data
from sklearn import pr... |
d4428c03e7cf387d923727a43208027ad76ae5b55352bc65558f7a0c43f171f3 | Python | 8,827 | 204 | #!/usr/bin/env python2
desc="""Report CNVs (duplications & deletions) between reference and sample BAMs.
TBD:
- consider using changing vectors like in CNVnator
"""
epilog="""Author: l.p.pryszcz+git@gmail.com
Bratislava, 4/11/2016
"""
import os, pysam, resource, subprocess, sys
import numpy as np
from datetime impor... |
7fc7e7622de2461f2fccb60899d673ea449788e19bb553826742c3c9d201b9aa | Python | 8,828 | 240 | # 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... |
49321109e709a4335299890edf0a890ea59c2c6544c6bd7c9f7cc97b4f5d62fb | Python | 8,834 | 257 | from dipy.align.transforms import regtransforms, Transform
import numpy as np
from numpy.testing import (assert_array_equal,
assert_array_almost_equal,
assert_almost_equal,
assert_equal,
assert_raises)
def test... |
f80bb087e8678693ae042a3a496e611264e825899b8dab75dd34c6e0e9c5f50e | Python | 8,837 | 315 | #
# The Python Imaging Library.
# $Id$
#
# EXIF tags
#
# Copyright (c) 2003 by Secret Labs AB
#
# See the README file for information on usage and redistribution.
#
##
# This module provides constants and clear-text names for various
# well-known EXIF tags.
##
##
# Maps EXIF tags to tag names.
TAGS = {
# possib... |
a9ce9aadfad2ce6e11353e68273e9de6d77b289fa91df23b6ea603d17e10fb4f | Python | 8,848 | 217 | import os
import sys
try:
basestring
except NameError:
# Python 3.x
basestring = str
def error(msg):
from distutils.errors import DistutilsSetupError
raise DistutilsSetupError(msg)
def execfile(filename, glob):
# We use execfile() (here rewritten for Python 3) instead of
# __import__() t... |
0b904233da31ae1df34ae02b45c7ce474ce7eaed207120e77675c533f0fcfed6 | Python | 8,863 | 236 | import textwrap
import docopt
import schema
import sargasso.separator.options as opts
from sargasso import __version__
from sargasso.utils import log
class CommandlineParser(object):
@classmethod
def parse(cls, args, doc):
docstring = cls._substitute_common_options_into_usage(doc)
return doco... |
b2f9d45f242a9b64252818942561894b9d4372679d12d420ccaa7b1d812e7f41 | Python | 8,868 | 302 | # -*- coding: utf-8 -*-
"""
celery.worker.autoreload
~~~~~~~~~~~~~~~~~~~~~~~~
This module implements automatic module reloading
"""
from __future__ import absolute_import
import hashlib
import os
import select
import sys
import time
from collections import defaultdict
from threading import Event
from ko... |
6f6da652253650ff9bf8cb00babce169761974dad1baa35defa26f31a3e40f6e | Python | 8,888 | 215 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Raw data collector for coverage.py."""
import atexit
import dis
import sys
from coverage import env
# We need the YIELD_VALUE opcode below, in a comparison-fr... |
7a1f9cca94d4021a48dc70fe2b8669477bc28944483badb15ef2a4477b4d5133 | Python | 8,889 | 256 | from contextlib import contextmanager
from .termui import get_terminal_size
from .parser import split_opt
from ._compat import term_len
# Can force a width. This is used by the test system
FORCED_WIDTH = None
def measure_table(rows):
widths = {}
for row in rows:
for idx, col in enumerate(row):
... |
9aea9cbceeb0208ec0e33f7c7de8b195968eb954c250d42c16121249bdf3f595 | Python | 8,935 | 237 | """
This module is for inspecting OGR data sources and generating either
models for GeoDjango and/or mapping dictionaries for use with the
`LayerMapping` utility.
"""
from django.contrib.gis.gdal import DataSource
from django.contrib.gis.gdal.field import (
OFTDate, OFTDateTime, OFTInteger, OFTInteger64, OFTReal, O... |
b5342f95840bdac1fbbf4e24758d1c0188f79a95e621e5a4cae9ce28dbd54ea7 | Python | 8,938 | 221 | # -*- coding: utf8 -*-
"""
Mostly a copy-paste of `spw_network.py` but this one is optimized for gamma oscillation
(Creates AdExpIF PC and BC populations in Brian2, loads in recurrent connection matrix for PC population
runs simulation and checks the dynamics)
authors: András Ecker, Szabolcs Káli last update: 03.2021
"... |
b3d415a0491e9365a95a5471d3972b4bc38a7e582ab9926b43f9a5375e2344cd | Python | 8,945 | 339 | ###############################################################################
# template.py provides the templates for the plugin functions
###############################################################################
# Copyright (c) 2019-2020, University of Liège
# Author: Nikita Beliy
# Owner: Liege University ht... |
3cf5956a4f088a49bf8003ecc4caf3c2c5450af1e0696de33da0d66752419775 | Python | 8,965 | 307 | # -*- coding: utf-8 -*-
# This module is based on the excellent work by Adam Bartoš who
# provided a lot of what went into the implementation here in
# the discussion to issue1602 in the Python bug tracker.
#
# There are some general differences in regards to how this works
# compared to the original patches as we do n... |
994420802a35c8646fa0fdf7ec452efe68097ed16c5a2df20739c70a590218ca | Python | 8,968 | 216 | import torch
import torch.nn as nn
class INCEPTION(nn.Module):
def __init__(self,in_channels,outputs_channels,scale=1):
super(INCEPTION,self).__init__()
self.scale=scale
self.branch1=nn.Sequential(
Conv1d(in_channels=in_channels, out_channels=outputs_channels, padding=0,kernel_size=1,stride=1)
)
self.br... |
36e7f995512f63b6cdac04df772f7b75659fbfb6b5a1ac2704666877c1ad5325 | Python | 8,980 | 239 | # coding: utf-8
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""XML reporting for coverage.py"""
import os
import os.path
import re
import sys
import time
import xml.dom.minidom
from coverage import env
from... |
927ba2b5f310755f30e5425e064e88d411efc3c64132a10d3afced6253ecd5bd | Python | 8,980 | 226 | #!/usr/bin/env python2
desc="""Report coverage from BAM file.
Support spliced alignments and mapping quality filtering.
By default ignores secondary alignments, duplicates and quality failed reads.
Dependencies:
- pysam (sudo easy_install -U pysam)
TDB:
- define minimum overlap
"""
epilog="""Author: l.p.pryszcz+git... |
4ca7c4d45781674a6e515b129034e121d59c285b6086d8e20a7c1eb4478f7dd9 | Python | 9,003 | 301 | ###############################################################################
# EDF.py provides an implementation of EDF class of EEG subclass
###############################################################################
# Copyright (c) 2019-2020, University of Liège
# Author: Nikita Beliy
# Owner: Liege University... |
3fbf24950cca29bf3bdab0845d68f93065084c0ed9379a718b2e79f738dde5a5 | Python | 9,014 | 270 | # -*- coding: utf-8 -*-
"""
The :program:`celery worker` command (previously known as ``celeryd``)
.. program:: celery worker
.. seealso::
See :ref:`preload-options`.
.. cmdoption:: -c, --concurrency
Number of child processes processing the queue. The default
is the number of CPUs available on your sy... |
51fad73316f3a960284087984ae16c5981671e89ac01952848568e2fac8a7c50 | Python | 9,039 | 225 | import pickle
import os.path as path
from os import makedirs, replace, rename
from tkinter import StringVar
from datetime import datetime
from warnings import warn
from bidshandler import BIDSTree
from Biscuit.FileTypes import FIFData, con_file, mrk_file, KITData
from Biscuit.utils.constants import OSCONST
from Biscu... |
a446c87296240750266db07f12400ec5d93290ca46056a1bf98042f281c96f54 | Python | 9,039 | 303 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Miscellaneous stuff for coverage.py."""
import errno
import hashlib
import inspect
import locale
import os
import sys
import types
from coverage import env
fro... |
afb6fbeb46043a753cce5491c43decf5eed8889ced298f953e74b52a378b57fb | Python | 9,042 | 272 | #!/usr/bin/env python2
"""Run local assembly pipeline.
Prerequisites:
Ray
samtools
Author:
l.p.pryszcz+git@gmail.com
Barcelona, 16/05/2012
"""
import os, sys
import gzip
import subprocess
from optparse import OptionParser,OptionGroup
from datetime import datetime
from genome_annotation import get_contig2readcount
... |
bec1acbf2e4b14b8f840eae7a0a4b7abbc1d3e60e16bd8f0ffaa3ea486f77a22 | Python | 9,048 | 237 | #!/usr/bin/env python2
desc="""Annotate SNPs with gene(s) and functions.
CHANGELOG:
+ 1.1:
- heterozygous sites support
"""
epilog="""Author:
l.p.pryszcz+git@gmail.com
Barcelona, 28/06/2012
"""
import argparse, os, sys
from Bio import SeqIO
from datetime import datetime
from genome_annotation import load_gtf, ... |
2f3292061eb577f64aff2096e737d1e1d3a6cd23ace9ae1c8f200583be5c66ed | Python | 9,065 | 257 | # -*- coding: utf-8 -*-
"""
celery.app.log
~~~~~~~~~~~~~~
The Celery instances logging section: ``Celery.log``.
Sets up logging for the worker and other programs,
redirects stdouts, colors log output, patches logging
related compatibility fixes, and so on.
"""
from __future__ import absolute_... |
1f27e16f310a3f9d77bf7feff434e4ccbae80b26526eff19b6e5f56994cf8abd | Python | 9,071 | 281 | """ Classes and functions for generalized q-sampling """
import numpy as np
from dipy.reconst.odf import OdfModel, OdfFit, gfa
from dipy.reconst.cache import Cache
import warnings
from dipy.reconst.multi_voxel import multi_voxel_fit
from dipy.reconst.recspeed import local_maxima, remove_similar_vertices
class General... |
9d8a08590bc86f94a582dd79f58c1e6daf5fea41a49852e3450784a789607ce2 | Python | 9,074 | 160 | """Execute all assigned Markdown Python blocks in page order, with no training stubs."""
import argparse
import hashlib
import importlib.metadata
import json
import os
import re
import subprocess
import sys
import time
from pathlib import Path
ROOT = Path(os.environ.get('TALOS_DOCS_ROOT', Path(__file__).resolve().pare... |
af3f0a632c51b96041ad6214d8e5e842c166ee68f8def1dcf55b019221e2e196 | Python | 9,074 | 229 | import socket
from pathlib import Path
import geoip2.database
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.validators import validate_ipv46_address
from .resources import City, Country
# Creating the settings dictionary with any settings, if needed.
GEOIP_SETT... |
ae68b27c38ac6f7399d1de5b71fee731b963a12feaf102cd7ce9dc00b22a45e2 | Python | 9,089 | 232 |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.transforms
from pathlib import Path
import json
if __name__ == "__main__":
# ----------- Settings ---------
datasets = {
# 'LIDC': Path.cwd()/('results/reliability/lidc/radiomic_scores.json'),
... |
7f23f25fd3949d6840ba4f935a6fbed1769e63774db1d04eae922f713bef6561 | Python | 9,093 | 266 | from __future__ import absolute_import
import os
import sys
import warnings
from kombu.utils import cached_property, symbol_by_name
from datetime import datetime
from importlib import import_module
from celery import signals
from celery.exceptions import FixupWarning
if sys.version_info[0] < 3 and not hasattr(sys,... |
f10133bcd6b22bba028c201a5f4d39f9fbe7d753cae3f557b6bec49126976a89 | Python | 9,132 | 338 | from __future__ import absolute_import
from celery import bootsteps
from celery.tests.case import AppCase, Mock, patch
class test_StepFormatter(AppCase):
def test_get_prefix(self):
f = bootsteps.StepFormatter()
s = Mock()
s.last = True
self.assertEqual(f._get_prefix(s), f.bluepr... |
2a070476f7381163a8d583b8345ddfd6afa541920200f4818ac1223e978a1bcc | Python | 9,147 | 198 | """The runtime ceiling cannot be raised by the PR it gates.
`max_total_seconds` is a ceiling, so *raising* it is the loosening that needs
a stated reason; lowering it is the ratchet working and needs no marker. This
mirrors `check_budget_ratchet` (`[budget-raise: ...]`) and
`check_coverage_ratchet` (`[coverage-lower: ... |
a64c954be0499389834ef7b49993149abad457f2079d093d02f82d904bdf10a3 | Python | 9,149 | 289 | # coding: utf-8
"""
Functions for parsing and dumping using the ASN.1 DER encoding. Exports the
following items:
- emit()
- parse()
- peek()
Other type classes are defined that help compose the types listed above.
"""
from __future__ import unicode_literals, division, absolute_import, print_function
import sys
... |
51f4b5cb1fea03d923277cd580387643ea97251ca39234c334492abd10156685 | Python | 9,155 | 218 | #!/usr/bin/env python2
desc="""Detect premature termination codons (PTC) and frameshifts from exonerate alignments.
Note, frameshifts are supressed for now.
Report BED-formatted output file, where:
- name field consists of gene name and affected amino position
- score is C-terminal fraction of protein affected by PTC ... |
521ec9716ad6da8800cbbe7a96a01addba6ad9a37aed2b870eb774e01a8d72af | Python | 9,161 | 227 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Functions for data simulation from PCM-models
@author: jdiedrichsen
"""
import numpy as np
import scipy.stats as ss
import scipy.linalg as sl
from scipy.spatial.distance import squareform
from PcmPy import matrix
from PcmPy import dataset
def make_design(n_cond, n_pa... |
30360fab6046e3a8580b2286bc06789e65253c3a86952d74e21d393cdc69898a | Python | 9,164 | 236 | #
# The Python Imaging Library.
# $Id$
#
##
# Image plugin for Palm pixmap images (output only).
##
from . import Image, ImageFile
from ._binary import o8, o16be as o16b
__version__ = "1.0"
_Palm8BitColormapValues = ( # noqa: E131
(255, 255, 255), (255, 204, 255), (255, 153, 255), (255, 102, 255),
(255, 5... |
55badd818a60f466248b16dd4768efe51b80b9f63760b1e2791dc561a13ee578 | Python | 9,204 | 230 | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'edit_event.ui'
##
## Created by: Qt User Interface Compiler version 6.9.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################... |
dc07fe792b70df4f871d16de23736f1ec9a82722da092f9a6e30be8bc1ec3de7 | Python | 9,223 | 264 | from __future__ import division, print_function, absolute_import
import numpy as np
from dipy.utils.optpkg import optional_package
from dipy.io.image import load_nifti
from scipy.spatial import cKDTree
from scipy.ndimage.interpolation import map_coordinates
from dipy.io.streamline import load_trk
from dipy.tracking.st... |
a8b3328e6be6d37d52617b78442f5d99f9d3a0a1618573aac63db265333ea30f | Python | 9,236 | 220 | import os
import sys
import time
import pandas as pd
from .acquisition import Data
from .models import *
from .integrated import *
def ml_task(task_id, task_type, train_data, enable_test, test_data, label, feat_sel, estimator, cv_type):
print(task_id, task_type, enable_test, label, feat_sel, estimator, cv_type)
... |
7e1dbedad84ddb71a165218eed7884de6cc3c53eb5613cb2ea72ec1ad89774db | Python | 9,239 | 240 | import numpy as np
from scipy import ndimage
from dipy.align import floating
from dipy.align.metrics import SSDMetric, CCMetric, EMMetric
from numpy.testing import (assert_array_equal,
assert_array_almost_equal,
assert_raises)
def test_exceptions():
for invali... |
d9d61c5b954b628093953c7ec80cb4be8cbb68bfecff60175e53e56bd02abedd | Python | 9,260 | 242 | #!/usr/bin/env python2
desc="""Identify RNA editing sites.
CHANGELOG:
v1.12
- skip alt base calling if less than 3 reads (--minAltReads)
- -o / --output option added
v1.11
- use fasta file as reference
TBD:
- rescue major alt haplotype if the other is only very low freq
- multithreading support
"""
epilog="""Author... |
d05a6a819e475563ed2a5654729320bd477b3055e5554f95a78b11fb685aa446 | Python | 9,262 | 272 | """Assemble model and training parameter choices for automatic scans."""
import numpy as np
loss = {'binary': ['binary_crossentropy', 'LogCosh'],
'multi_class': ['sparse_categorical_crossentropy'],
'multi_label': ['categorical_crossentropy'],
'continuous': ['mae']}
last_activation = {'binary'... |
6075c729af82308dc22a1efc126996f8c1d8eb4c240ffe3494ef43ebf7d4d2ea | Python | 9,284 | 242 | """
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 ... |
5184852ea93128d5e905b85f63d9191a7e23395c8aadf95df92983898da760e4 | Python | 9,292 | 301 | # -*- coding: utf-8 -*-
"""
celery.utils.log
~~~~~~~~~~~~~~~~
Logging utilities.
"""
from __future__ import absolute_import, print_function
import logging
import numbers
import os
import sys
import threading
import traceback
from contextlib import contextmanager
from billiard import current_process, uti... |
2164f0a43b5cedfb0c523e4f04f52e4be61495acbe58e4eebc72d6aa51275585 | Python | 9,296 | 249 | """Module containing utility functions for augmentation operations.
This module provides a collection of helper functions and utilities used throughout
the augmentation pipeline. It includes functions for image loading, type checking,
error handling, mathematical operations, and decorators that add functionality to
ot... |
99c96bd352ad6280f4a17b584a0e9eaca630f016f6eeed0b26b06b0f88421509 | Python | 9,303 | 299 | # -*- coding: utf-8 -*-
"""
celery.loaders.base
~~~~~~~~~~~~~~~~~~~
Loader base class.
"""
from __future__ import absolute_import
import anyjson
import imp as _imp
import importlib
import os
import re
import sys
from datetime import datetime
from kombu.utils import cached_property
from kombu.utils.enco... |
825b144540717ccaa3d17613704a2c671ea804bf8509a761208b9003573199f5 | Python | 9,314 | 229 | # 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
from cryptography import utils
from cryptography.exceptions import Invali... |
c6f6a3afd606116a9052541ad060fa9988b23104f1bf63a46f5b8908def19212 | Python | 9,326 | 250 | """ recording warnings during test function execution. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect
import re
import sys
import warnings
import six
import _pytest._code
from _pytest.deprecated import PYTEST_WARNS_UNKNOWN_KWARGS
from _... |
d95e53a792ad4a9f855900ec4831c96335464334cd35c8f1230cae9e7da33a32 | Python | 9,379 | 181 | # -*- coding: UTF-8 -*-
from django import forms
from django.core.validators import EMPTY_VALUES
from django.utils.translation import ugettext_lazy as _
from django.forms import ModelForm, TextInput, DateInput, Select, RadioSelect, TypedChoiceField
from django.forms.widgets import Textarea
from patient.models import P... |
ff9b58510c91976ad7f3f528d51f044ebc054331f94091b9a6e04bb8576bff31 | Python | 9,394 | 263 | from __future__ import annotations
import argparse
import inspect
import os
import re
import sys
from pathlib import Path
sys.path.append("..")
import albumentations
from albumentations.core.type_definitions import Targets
IGNORED_CLASSES = {
"BasicTransform",
"DualTransform",
"ImageOnlyTransform",
"... |
bdd39137a97a5d9c8242903ef6d764ef522b18b72200712298e7392ac1bb60dc | Python | 9,419 | 314 | # coding: utf-8
"""
Classes and objects to represent prime-field elliptic curves and points on them.
Exports the following items:
- PrimeCurve()
- PrimePoint()
- SECP192R1_CURVE
- SECP192R1_BASE_POINT
- SECP224R1_CURVE
- SECP224R1_BASE_POINT
- SECP256R1_CURVE
- SECP256R1_BASE_POINT
- SECP384R1_CURVE
- SECP3... |
fdcefad93142079e291f075b8dbc7eeda6001fbf68d7913bb3f7937d13701244 | Python | 9,440 | 301 | #
# The Python Imaging Library.
# $Id$
#
# a Tk display interface
#
# History:
# 96-04-08 fl Created
# 96-09-06 fl Added getimage method
# 96-11-01 fl Rewritten, removed image attribute and crop method
# 97-05-09 fl Use PyImagingPaste method instead of image type
# 97-05-12 fl Minor tweaks to match the IFUNC9... |
16c0cbc08f99bcca43d00eb3de2c47a371628272c50da2f001b0c8a474b8ecbd | Python | 9,447 | 253 | #!/usr/bin/env python2
"""
Parses SNPs against reference.
-compare with reference (optionally)
Not finished!
"""
import os, sys
import commands
from optparse import OptionParser
from datetime import datetime
from genome_annotation import load_gtf,load_gff,genome2dict,coding_snp_info # bin/python_modules
#from bam2snp... |
b38550290b79af62ac9fe61b1888b8b6d69a6d3fe59b1360591b1e67acb3e52f | Python | 9,455 | 336 | #
# The Python Imaging Library
# Pillow fork
#
# Python implementation of the PixelAccess Object
#
# Copyright (c) 1997-2009 by Secret Labs AB. All rights reserved.
# Copyright (c) 1995-2009 by Fredrik Lundh.
# Copyright (c) 2013 Eric Soroos
#
# See the README file for information on usage and redistribution
#
# Note... |
777d31ff7d894da6c80ceeedd1ef3cb3dee023650c76d4846cd8dd70be9cb3d8 | Python | 9,479 | 322 | #
# The Python Imaging Library.
#
# SPIDER image file handling
#
# History:
# 2004-08-02 Created BB
# 2006-03-02 added save method
# 2006-03-13 added support for stack images
#
# Copyright (c) 2004 by Health Research Inc. (HRI) RENSSELAER, NY 12144.
# Copyright (c) 2004 by William Baxter.
# Copyright (c) 2004 ... |
87973f40972c9a80f9e94c21b22e1c0022b7c3870fd5d9dddddfbcfab394b42d | Python | 9,487 | 275 | from __future__ import absolute_import
import os
import sys
import warnings
from celery import loaders
from celery.exceptions import (
NotConfigured,
)
from celery.loaders import base
from celery.loaders import default
from celery.loaders.app import AppLoader
from celery.utils.imports import NotAPackage
from cele... |
c26e50ec244223e219e66660cfefc9dfd2497257d2eb29246be138f62a0f098f | Python | 9,519 | 319 | import atexit
import errno
import fnmatch
import itertools
import operator
import os
import shutil
import sys
import uuid
from functools import reduce
from os.path import expanduser
from os.path import expandvars
from os.path import isabs
from os.path import sep
from posixpath import sep as posix_sep
import six
from s... |
e2ca854ffd0af1e449abfe8e81f8863e5f350dfdf1e769ae5152176a7a286ec1 | Python | 9,529 | 258 | #!/usr/bin/env python2
desc="""Count k-mers occurencies in reads and report freq plot.
Not working for k > 16...
NOT RECOMMENDED! USE JELLYFISH INSTEAD:
#jellyfish
k=31; q=20;
for f in _archives_CANTHE/CAN*read?.fastq.gz; do
s=`echo $f | cut -f2 -d"/" | cut -f1 -d"."`;
if [ ! -s _archives/$s.k$k.q$q.hist ]; then ... |
5adce8d4f07559f80961a0a15d0b3b8eea05de8704b16f633e8a7b369202f674 | Python | 9,533 | 252 | #. Copyright (C) 2005-2010 Gregory P. Smith (greg@krypto.org)
# Licensed to PSF under a Contributor Agreement.
#
__doc__ = """hashlib module - A common interface to many hash functions.
new(name, data=b'', **kwargs) - returns a new hash object implementing the
given hash function; ... |
c549fef48d8b8a9226101e8e5d001e9bc347edd3be1faa4bb1cac229fdf466a9 | Python | 9,550 | 299 | from __future__ import division, print_function, absolute_import
from warnings import warn
import numpy as np
from dipy.reconst.dti import fractional_anisotropy, color_fa
from scipy.ndimage.filters import median_filter
try:
from skimage.filters import threshold_otsu as otsu
except Exception:
from dipy.segme... |
fb5a62a048ff4346cad82e27cc62a746f983d67b2eb60b5786890d2bb7c7947c | Python | 9,554 | 260 | import numpy as np
import scipy as sp
import scipy.special as sps
from numpy.testing import (run_module_suite,
assert_,
assert_equal,
assert_raises,
assert_array_almost_equal)
from dipy.denoise.localpca import lo... |
654e3585a0a16117c8754bc6db6a17e59572db8e382d1fbca11c53c560f2d8eb | Python | 9,579 | 247 | """
BORIS plugin
Inter Rater Reliability (IRR) Weighted Cohen's Kappa with modifiers
- Supports behaviors with duration (start < stop) AND instantaneous events (start == stop)
- Modifiers are included in the category label (subject|behavior|mod1,mod2,...)
- Aggregated warning when kappa is NaN to avoid multiple popups... |
d4fb98200cee7ca9a48a6f3df319a01903fdcbc2ec8abfc44173711496c1bb0c | Python | 9,595 | 261 | """Transforms for type conversion between float and other data types.
This module provides transform classes for converting image data types, primarily
for converting between floating point and integer representations. These transforms
are useful for preprocessing before neural network input (ToFloat) and for converti... |
f230bf07834251b6fc707c11394d46fa7c361c59be88003bfab444a6be6c12b6 | Python | 9,609 | 295 | #
# The Python Imaging Library.
# $Id$
#
# Windows Icon support for PIL
#
# History:
# 96-05-27 fl Created
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1996.
#
# See the README file for information on usage and redistribution.
#
# This plugin is a refactored version of Win32IconImageP... |
0679262d1cb4f44dfb22a0523341bc8e21e20eb2812035cb9593fa66b5f6bf3c | Python | 9,622 | 288 | """ discovery and running of std-library "unittest" style tests. """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import traceback
import _pytest._code
import pytest
from _pytest.compat import getimfunc
from _pytest.config import hookimpl
from... |
64adfe557528e313404bbe4c6b11d2f90e152edbf948e9e7a0b2a0276a4a3e4f | Python | 9,628 | 162 | """Analyze experiment tables and caller-supplied prediction diagnostics."""
from pathlib import Path
import numpy as np
import pandas as pd
class Log:
"""Analyze generic experiment tables and explicitly supplied predictions."""
from talos.log._experiment_parameter_correlation import experiment_parameter_cor... |
11fd5dee98f596832295fb543eab5b1a17107b53681cf1656ed307b2a77ebb4e | Python | 9,636 | 329 | # -*- coding: utf-8 -*-
"""
celery.utils.threads
~~~~~~~~~~~~~~~~~~~~
Threading utilities.
"""
from __future__ import absolute_import, print_function
import os
import socket
import sys
import threading
import traceback
from contextlib import contextmanager
from celery.local import Proxy
from celery.fiv... |
ddfab85fc2cf886763c5eb4d3179499927f30fd10ad6ea2b56bc2d6e516d9adf | Python | 9,642 | 269 | ###############################################################################
# BidsMeta.py defines class that provides interface to bids tsv tables
###############################################################################
# Copyright (c) 2019-2020, University of Liège
# Author: Nikita Beliy
# Owner: Liege Univ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.