sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
5c9b5e80d5711a9fb8d76d0206725bc8df1593075cc01ed316206c465efd2867 | Python | 53,040 | 1,245 | from contextlib import redirect_stdout
import copy
import io
import networkx as nx
import os
import pathlib
import tempfile
import unittest
import warnings
import zipfile
from networkx import DiGraph
from networkx.classes.reportviews import NodeView
from .._checksum_validator import ChecksumDiff, ValidationCode
from ... |
14da3afdf4ec903c66c4c67db2c0490dee9a9880ca52e3c36e942b595a660930 | Python | 53,430 | 1,248 | #! /usr/bin/env python3.5
import configparser
import json
import logging
import matplotlib.pyplot as plt
import numpy as np
import os
import sys
import threading
import time
from typing import List
import wx
import wx.lib.scrolledpanel
import ok
import osc1lite
__version__ = '2.0.3'
logging.basicConfig(level=os.env... |
57d3add0d635f9676a3aa514c7b3c00e07da4964791709b83debf4b47214583e | Python | 53,507 | 1,435 | """Abstract base class for scalar DoubleML models (single parameter estimation)."""
import warnings
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Any, Callable, ClassVar
from typing_extensions import Self
if TYPE_CHECKING:
from .utils._tune_optuna import DMLOptunaResult
import numpy as n... |
f23c8e877f6628f072102a7d8c6e57a3125dbd4448ba507f5fe9da8475cd49f5 | Python | 54,094 | 966 | #!/usr/bin/env python
import os
import argparse
import yaml
import json
import xml.etree.ElementTree as ET
import pandas as pd
from pathlib import Path
from shivai import __version__
def shivaParser():
DESCRIPTION = """
SHIVA pipeline for deep-learning imaging biomarkers computation. Performs resampling and coreg... |
eaf97e4c5afb5e936a832adfe541cada93bb6d7ecd42f0cbbe8cb60e035b0dfa | Python | 54,424 | 1,122 | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... |
38ccce7de142a3c7896ed3267c74275258e63516a5106fb5257269465eeb1416 | Python | 54,504 | 1,517 | #nengo
import nengo
import nengo.spa as spa
from nengo_extras.vision import Gabor, Mask
#other
import numpy as np
import numpy.matlib as matlib
import scipy
import scipy.special
import scipy.sparse
import inspect, os, sys, time, csv, random
import png ##pypng
import itertools
import base64
import PIL.Image
import so... |
c10aff7f0aecdc76a49a4ff6bb87f9ed9ab219240b9376fed407d4829d32e5ee | Python | 55,506 | 1,621 | import numpy as np
import scipy as sp
import sklearn
from scipy.stats import norm
from sklearn.utils.extmath import randomized_svd
#from sklearn import preprocessing
from skimage.transform import downscale_local_mean
import concurrent
#import cvxpy as cp
import multiprocessing
import itertools
import time
import math... |
5c7588939cf5f5d1c05ab23cc922b19a8e2674db08963a458d44ab16e9a51bb3 | Python | 55,866 | 1,442 | import itertools
import json
import logging
import math
import os
import pathlib
import random
import shutil
import time
import urllib.request
from abc import ABC, abstractmethod
from datetime import datetime
import bs4
import numpy as np
import requests
from dateutil.relativedelta import relativedelta
try:
from ... |
0f28717778557291f348052c10dbc7883e5212a8fd352a4c9a12aae711d51098 | Python | 56,764 | 1,227 | import dash
from dash import Output, Input, State, MATCH, ALL, ctx, dcc, html
from dash.exceptions import PreventUpdate
import plotly.graph_objects as go
import plotly.express as px
from plotly.subplots import make_subplots
import pandas as pd
import numpy as np
from plots import *
from operations.alignment import al... |
21bb7308918f944f8d2a9b6da257f7c759253534c5ef21ea57530cb03f804065 | Python | 56,868 | 1,617 | # This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>
import math
import warnings
from dataclasses import dataclass, field, fields, replace
from typing import Callable, ClassVar, Literal, Optional, Sequence, ... |
210d56afb40de7af25ceda5e0366a0d0c74384ae56afb5b9024eec96508f6b36 | Python | 57,404 | 1,499 | # This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>
from functools import partial
from typing import List, Literal, Optional, Sequence, Tuple, Union
import torch
import zuko
from nflows import distribution... |
9d9f20665ab853192b8725b131b06531d8721824ab7d0511667fffd9e6ef633b | Python | 57,459 | 1,523 | # This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>
import os
import time
import warnings
from abc import ABC, abstractmethod
from copy import deepcopy
from dataclasses import asdict
from datetime import da... |
3d23345cd459f9467b2ba02379164d961a660f9a3f43d4c153663d90b1cc88b7 | Python | 57,698 | 1,475 | # coding: utf-8
import filecmp
import numbers
import re
import signal
import warnings
from copy import deepcopy
from pathlib import Path
import numpy as np
import pytest
from scipy import sparse
import lightgbm as lgb
from .utils import (
BuildInfo,
dummy_obj,
load_breast_cancer,
make_blobs,
mse_... |
c70009ace465ddfe8b8eea2b76b313630fd3e777d5fce164995426bfcdc89ecc | Python | 59,276 | 1,550 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 Tomoki Hayashi
# MIT License (https://opensource.org/licenses/MIT)
"""Train Parallel WaveGAN."""
import argparse
import logging
import os
import sys
from collections import defaultdict
import matplotlib
import numpy as np
import soundfile as sf
import... |
c81afb134845327feffc05c50b8e7f122c2220ed4689ce7be098523e6cd40733 | Python | 60,064 | 1,451 | import glob
import logging
import math
import os
import platform
import random
import shutil
import subprocess
import time
from contextlib import contextmanager
from copy import copy
from pathlib import Path
import cv2
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as... |
e9258f8936c51ef833d884035f6a833365f27358fbb1b30c5a109215ed633b3d | Python | 60,209 | 1,711 | # Imports #
import configparser
import numpy as np
import os
import pathlib
import random
import statistics
import time
import traceback
from Classes.Protocol import ImageButton, ProtocolBase, PreloadedVideo
from kivy.clock import Clock
from kivy.config import Config
from kivy.uix.button import Button
from kivy.uix.... |
2933fac99a9a79f69567a75b864ed13e6852a81a37e4c642f6cbfa6dcfc8b860 | Python | 60,260 | 1,155 | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 14 14:05:22 2020
@author: Frank
"""
import pdb, traceback, sys
import numpy as np
import random
import pickle
import math
from collections import OrderedDict
import collections
import torch
torch.set_printoptions(precision = 10)
from copy import deepcopy
import time
... |
aeb3bd25ee2f58c3a723c1441a3c4326f354ac78aa7d634c7ec2879f881f46e4 | Python | 60,638 | 1,466 | import glob
import logging
import math
import os
import platform
import random
import shutil
import subprocess
import time
from contextlib import contextmanager
from copy import copy
from pathlib import Path
import cv2
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as... |
e528a929414bb5d27297f409e4eda795c976fe672424d9f9a3c4c16358287e8e | Python | 60,679 | 1,466 | import glob
import logging
import math
import os
import platform
import random
import shutil
import subprocess
import time
from contextlib import contextmanager
from copy import copy
from pathlib import Path
import csv
import cv2
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import torch
import ... |
f7e9bdacff2b0869947f43c71a8fbc9f8ea163913e7540f5b73511676fe02791 | Python | 61,804 | 1,579 | import copy
import warnings
from typing import Optional
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from joblib import Parallel, delayed
from matplotlib.lines import Line2D
from sklearn.base import clone
from doubleml.data import DoubleMLPanelData
from doubleml.data.ut... |
63115e0c8c39b7e8ca2a06925a288a3b140d7ab0e6e3106429434ce071038af8 | Python | 62,031 | 1,583 | """
This file contains the functions and classes for fitting data to a
distribution.
"""
# These packages are pretty fundamental to the
# operation of this library, so we should import them at the top.
import numpy as np
from numpy import nan
import matplotlib.pyplot as plt
# For float errors
import sys
# For checkin... |
b58ebe5f3695581a1d4aeb76791b46e1b1692dbfbd93e567dc6150a175a6d0a5 | Python | 63,506 | 1,383 | from __future__ import print_function
import json, time, os, sys, glob
import shutil
import numpy as np
import torch
from torch import optim
from torch.utils.data import DataLoader
from torch.utils.data.dataset import random_split, Subset
import copy
import torch.nn as nn
import torch.nn.functional as F
import random
... |
c2013c926cc6d18a60ab4ce7b7bbb66bb89c953b593e38ecb051be40b1ee2389 | Python | 63,632 | 1,307 | ############################################
# imports
############################################
import os
import pickle
from pathlib import Path
from typing import Any
import pandas as pd
import yaml
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from effidict import EffiDict, L... |
690a991979ab24c8f79edce903c32ea82f164d82e772f53da8dbb807596502b6 | Python | 63,949 | 1,438 | # This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>
import math
import warnings
from copy import deepcopy
from dataclasses import dataclass, replace
from typing import TYPE_CHECKING, Callable, Dict, Iterabl... |
f8e96017fe6b1c70c53edbf7907fe9f912d783742283fb3ec06bfcf7df15fd26 | Python | 64,474 | 1,647 | import os
import stat
from pathlib import Path
from unittest.mock import Mock
import pytest
pytestmark = pytest.mark.train
def _write_export_inputs(tmp_path, model_yaml: str) -> tuple[Path, Path, Path]:
torch = pytest.importorskip("torch")
weights = tmp_path / "weights.pt"
model_config = tmp_path / "mod... |
5de968642c838efca6be1a8f04bbbcb063fb383a4ade08c61db4e690c7b58327 | Python | 64,647 | 1,398 | import bibtexparser as bp
import networkx as nx
import os
import pandas as pd
import pathlib
import re
import tempfile
import unittest
from unittest.mock import MagicMock, patch
import zipfile
from qiime2 import Artifact
from qiime2.sdk import PluginManager
from qiime2.sdk.usage import Usage, UsageVariable
from q2cli.... |
0e3f91d036715125e69f97d72107372ee7952501b8beb302b799f2888c13a4b0 | Python | 64,885 | 1,475 | """
Build FASTA sequences for annotated genomic regions from GFF and genome files.
Given a genome annotation and the matching FASTA, this module extracts intervals
such as genes, exons, introns, CDS, UTRs, intergenic stretches, and exon-exon junctions.
Use :class:`CustomGenomicRegionGenerator` with local files, or
:cl... |
5b5559116481b6b971ab7fc4a42721bccb6dd95f721ffa8e9e84c6260b1c8a3d | Python | 65,333 | 1,095 | """
Main workflow generator, with conditional piping (wf shape depends on the prediction types)
"""
from shivai.utils.misc import get_aquisitions_mapping, get_first_item, set_wf_shapers, get_img_acquisitions # , as_list
from shivai.workflows.post_processing import genWorkflow as genWorkflowPost
from shivai.workflows.p... |
ae9ff729681ab21f2ac73e9462d8ec0f8c98b19fe9ed70f703ef81a4439a2cab | Python | 65,530 | 1,480 | # -*- coding: utf-8 -*-
import platform
import shutil
import re
import sys
import copy
import os
import manager_utils as mu
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import *
system = platform.system()
if system != 'Linux' and system != 'Windows':
raise Exception("OS {} is not handled with t... |
576325860dd305a25b51af2c35d5ed5c8f6d1076f1738ce018f491889f56da0b | Python | 65,836 | 1,410 | """
This custom TDT file reader is adapted from the TDTbin2py code from the official
TDT python package. Everything is the same, except the `read_block` function is
modified to a `find_start_and_end_times` function. It finds the start and end
times of a recording, which is important if the data block was not close... |
8a38b5eb0710b561b40d3c0a3ab64901ed7a71321df1b2d4d22352d5eac47a24 | Python | 66,401 | 1,619 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 25 19:52:45 2020
@author: mfromano
"""
import pandas as pd
import numpy as np
import sys
from preprocessing.metadata_locations import DXTRANS, \
DX_CONVERSION_DICT, MetadataCSV, FILE_LIST, NACC_FILE_LIST
from icecream import ic
import re
import... |
0832c29c1cde8d22b0a37df99ccb496664a31ffde4525db88c42ed127bab44de | Python | 67,104 | 1,647 | #nengo
import nengo
import nengo.spa as spa
from nengo_extras.vision import Gabor, Mask
from nengo.utils.builder import default_n_eval_points
#other
import numpy as np
import numpy.matlib as matlib
import scipy
import scipy.special
import scipy.sparse
import inspect, os, sys, time, csv, random
import png ##pypng
imp... |
fca65341693277ada531407d93a1a8e91950815a7f397ae6772724026b9cab7d | Python | 67,980 | 1,798 | #nengo
import nengo
import nengo.spa as spa
from nengo_extras.vision import Gabor, Mask
#other
import numpy as np
import numpy.matlib as matlib
import scipy
import scipy.special
import scipy.sparse
import inspect, os, sys, time, csv, random
#import matplotlib.pyplot as plt
import png ##pypng
import itertools
import ... |
16f642053f559fa0daf9e552eccad0b7c3e56f45d08e476093e36c777e9416b3 | Python | 67,996 | 1,905 | ##############################################################################
# Kivy Launcher Interface #
# by: Daniel Palmer PhD #
# revisions: Filip Kosel PhD #
# ... |
72896859699a6db7b933807fd8487c811d0bfdead8fdad1b5ed38575456846f7 | Python | 68,052 | 1,594 | import os
import sys
import string
import copy
from p4.var import var
from p4.nexustoken import nexusSkipPastNextSemiColon, safeNextTok
import p4.func
from p4.p4exceptions import P4Error
# [Examples from the paup manual,
# but note the bad charpartition subset names '1' and '2'. P4 would not allow those names.]
# ch... |
04ad05075827b8d76232453f6ce5b0ca8c985c52f249b232e84be7f6d236a7e4 | Python | 69,037 | 1,465 | import string
import p4.func
from p4.var import var
from p4.alignment import Alignment
from p4.nexustoken import nextTok, nexusSkipPastNextSemiColon, nexusSkipPastBlockEnd, safeNextTok
from p4.nexussets import NexusSets
from p4.sequence import Sequence
from p4.p4exceptions import P4Error
from p4.tree import Tree
# Som... |
7cba12af31fead098b4670e68cf83c8fbc875ca5f3ed4abeab34cac45affac1b | Python | 70,159 | 1,514 | # Copyright (c) 2023 IBM Research. All Rights Reserved.
#
# Code accompanying a manuscript entitled:
# "On the visual analytic intelligence of neural networks"
import utils
from geometry import Line, Point
from random import randint, uniform, choice
from scipy.spatial import ConvexHull
from shapely.geometry i... |
a27e41c5688cb19a3aeffce1672e1eae8568c28a4b67a09d40052d072506e12a | Python | 71,333 | 1,683 | import math
import os
import re
import warnings
from dataclasses import dataclass
from typing import Any, NamedTuple
import nvalchemiops
import torch
from nvalchemiops.neighbors import NeighborOverflowError
from nvalchemiops.torch.interactions.dispersion import dftd3
from nvalchemiops.torch.interactions.electrostatics... |
ffb09ffd70465c8855a2943597e8fe30c52cac4a655ee5b4817cccf9f52eb177 | Python | 71,902 | 1,555 |
__author__ = "Grzegorz Chojnowski"
__date__ = "27 Apr 2021"
import os,sys,re
import json
import time
import gzip
from datetime import timedelta
from shutil import which
from io import StringIO
try:
from termcolor import colored
COLOR=1
except ImportError:
COLOR=0
from optparse import OptionParser, Opti... |
89e52e92300cf13990644e10e50fe9db9426eee6ed51b5b7205caad46f5ec182 | Python | 72,941 | 1,652 | """FED3-aware FiPhoPHA draft.
Reads a FED3_FP_Combined.xlsx workbook created by FED3_post_processing.py,
keeps its time and metadata information, optionally downsamples the traces,
and runs metadata-labelled between-group bootstrap/permutation analyses.
This draft intentionally implements BETWEEN-GROUP analyses only.... |
799a25a6ce355579678809021fcf1506b3b70e678425e04126a736db8f22d1ad | Python | 74,579 | 1,439 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... |
9b5fd6780fe479a1fc4175bf448834ebb658b0b4b323beacfc20e73d80e5f87c | Python | 74,622 | 1,865 | import copy
import warnings
from abc import ABC, abstractmethod
import numpy as np
import pandas as pd
from scipy.stats import norm
from sklearn.base import is_classifier, is_regressor
from doubleml.data import DoubleMLDIDData, DoubleMLPanelData, DoubleMLRDDData, DoubleMLSSMData
from doubleml.data.base_data import Do... |
8d479162fa4fd7f207c61ee3dcf7b4214161e21faceac40c73fa6dfb9340ea86 | Python | 78,012 | 1,620 | """
Stimulus classes.
Each class is is derived from flystim.base.BaseProgram, which handles the GL context and shader programs
"""
import numpy as np
from numpy.random import default_rng
import os
import array
from flystim.base import BaseProgram
from flystim.trajectory import make_as_trajectory, return_for_time_t
i... |
1b29422fb44e95316fd9a470caf37a36a966d7935a950e4472bce3a06e297783 | Python | 83,622 | 2,206 |
# Version: 0.28
# flake8: noqa
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/python-versioneer/python-versioneer
* Brian Warner
* License: Public Domain (Unlicense)
* Compatible with: Python 3.7, 3.8, 3.9, 3.10 and py... |
04b5bc5be1c7ac456bd2dc6cd316b897c8653eeff7a6b083cf2abf9460d8e5b5 | Python | 83,836 | 2,475 | # mypy: allow-untyped-defs, no-strict-optional
from typing import Union, Optional, Tuple, Any
from typing_extensions import Literal
from abc import ABC
from abc import abstractmethod
import numpy as np
import eagerpy as ep
import logging
import warnings
from ..devutils import flatten
from . import LinearSearchBlendedU... |
72a85d8be5ea2db0c871e03d70bcbf1ab4729b81f7008d968f45629b79a3e52c | Python | 89,852 | 2,112 | """Custom nipype interfaces for image resampling/cropping and
other preliminary tasks"""
import os.path as op
from shivai.postprocessing.lobarseg import lobar_and_wm_segmentation
from shivai.postprocessing.custom_parc import seg_for_pvs, seg_for_wmh, seg_from_mars
from shivai.postprocessing.pvs import quantify_clu... |
27b1304d0e6fed9eabe63e8256c76060a4cdcbf9d1602f26da42ce1c1ce9312b | Python | 90,588 | 2,039 | # coding: utf-8
"""Tests for lightgbm.dask module"""
import inspect
import re
import socket
import textwrap
import warnings
from itertools import groupby
from sys import platform
from urllib.parse import urlparse
import pytest
from sklearn.metrics import accuracy_score, r2_score
import lightgbm as lgb
from .utils i... |
c7901f068ab26c92a21dc73f9149cf512bd174b281edfe487397fcb9aa19c177 | Python | 95,674 | 1,074 | from dash import html, dcc
import plotly.graph_objects as go
import dash_bootstrap_components as dbc
import dash_dangerously_set_inner_html
import uuid
from app_main.settings import appname
from app_main.constants import UploadFileType, blank_layout, color_types
from app_main.utilities import unique_visitors
def get... |
d60f444a07dc3d6f310a09e3e2d9116938a8b20fe16ce372459d608976d39def | Python | 95,775 | 2,309 | import string
import io
import sys
import os
from p4.tree import Tree
from p4.node import Node, NodePart, NodeBranchPart
from p4.trees import Trees
from p4.nexus import Nexus, NexusData
from p4.p4exceptions import P4Error
from p4.nexustoken import nextTok, safeNextTok, nexusSkipPastNextSemiColon
import p4.func
from p4.... |
74d31c783931d9242c17df5e321a9fcc665da465fb92e61e75704790a466b8c5 | Python | 99,507 | 2,570 | from abc import abstractmethod
from functools import partial
import math
from typing import Iterable
import numpy as np
import torch as th
import torch.nn as nn
import torch.nn.functional as F
from .diffusion_utils import \
checkpoint, conv_nd, linear, avg_pool_nd, \
zero_module, normalization, timestep_embed... |
81f815e3b78ce54284f8343d67ed384bafd8361c60df9a42f782fcdf298db241 | Python | 99,595 | 2,569 | from abc import abstractmethod
from functools import partial
import math
from typing import Iterable
import numpy as np
import torch as th
import torch.nn as nn
import torch.nn.functional as F
from .diffusion_utils import \
checkpoint, conv_nd, linear, avg_pool_nd, \
zero_module, normalization, timestep_embed... |
3c85cb030dc945412f48c93a800d509cea261c486d75093c7e66f0961e85fb96 | Python | 99,742 | 2,310 | # Network Wrappers
# Created: 5/21/2021
# Status: OK
import os
import sys
import collections
import shutil
import nilearn
import time
import glob
import csv
import torch
import shap
import numpy as np
import torch.nn as nn
import torch.optim as optim
import matplotlib.pyplot as plt
import matplotlib.patches as patche... |
9cbdae9a4c9ecc5ea5ebb7afbf99a7460748d28a98f5e3f26c8d761019973d75 | Python | 103,215 | 2,727 | from p4.p4exceptions import P4Error
from p4.treepartitions import TreePartitions
from p4.tree import Tree
from p4.trees import Trees
from p4.func import read
from p4.var import var
import sys
import csv
import random
from math import log, factorial, floor
ROOT_NODE_NAME = 'A_NAME_NOT_EASILY_FOUND_IN_A_TREE'
TAXON_SEP... |
9291daf92f141ad17787d754bdda860f35bf8138510100e6db1a5eca77de7f78 | Python | 104,355 | 1,148 | from dash import html, dcc
import plotly.graph_objects as go
import dash_bootstrap_components as dbc
import dash_dangerously_set_inner_html
import uuid
from app_main.settings import appname
from app_main.constants import UploadFileType, blank_layout, color_types
from app_main.utilities import unique_visitors
def get... |
d07d78b84ac44729ed63d3c1240759bed283d0463707d6a1bc7137210beaa0ab | Python | 105,487 | 2,001 | ############################################
# imports
############################################
import itertools
import os
import shutil
from pathlib import Path
import numpy as np
import pandas as pd
import yaml
from Bio.SeqUtils import Seq
from oligo_designer_toolsuite._exceptions import (
ConfigurationErr... |
be878db97313206f58627a5b6edf42b063acbabe68c6b9f3b4dc79f248ed0bc0 | Python | 105,998 | 2,827 | # Imports #
import configparser
import numpy as np
import pandas as pd
import pathlib
import random
import statistics
import time
import traceback
from Classes.Protocol import ImageButton, ProtocolBase, PreloadedVideo
from kivy.clock import Clock
from kivy.uix.button import Button
from kivy.uix.label import Label
fr... |
b915d30b3c43e0055a2187872921cb492f436e5b4f512af7ca3f6d063c60bb9b | Python | 106,936 | 2,691 | # Copyright (c) OpenMMLab. All rights reserved.
import copy
import inspect
import math
import warnings
import cv2
import mmcv
import numpy as np
from numpy import random
from mmdet.core import PolygonMasks
from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps
from ..builder import PIPELINES
try:
from ima... |
f9203df2f93c8e96a53442f1c3fe01d7cfe219f9158de3390532792b1b531137 | Python | 111,022 | 2,564 | # coding: utf-8
import inspect
import itertools
import math
import re
import sys
import textwrap
import warnings
from functools import partial
from pathlib import Path
from unittest import mock
import joblib
import numpy as np
import pytest
import scipy.sparse
from scipy.stats import spearmanr
from sklearn.base import... |
36478cea5fcbb7abd847c53e79013019a7dfbbb80a920e6dd6e7f00561b8f2e5 | Python | 112,151 | 2,033 | ############################################
# imports
############################################
import itertools
import os
import random
import shutil
from pathlib import Path
import yaml
from joblib import Parallel, delayed
from joblib_progress import joblib_progress
from oligo_designer_toolsuite.database impor... |
57cce94cc625a7d2ed710122217e77dbdc4b7babe2d63f35354856d5bcb33c1e | Python | 113,236 | 2,416 | import copy
import math
import warnings
import weakref
from collections.abc import Callable, Collection, Mapping
from types import MappingProxyType
from typing import Any, ClassVar, Literal, Self, cast
import torch
from torch import Tensor, nn
from aimnet import nbops
from aimnet.models.artifact_validation import use... |
9150cec94bc0d640795775ab84fb143db0fa564212f2d1fe72c165bbf73f33ff | Python | 115,312 | 3,134 | # This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>
import copy
from dataclasses import replace
from typing import (
Any,
Callable,
Dict,
List,
Literal,
Optional,
Tuple,
Type... |
401b6c59c9ba138a75682f07b1b66c51ffdfe5ba26e8698719837d0c033b18e2 | Python | 116,117 | 2,531 | # coding: utf-8
"""Distributed training with LightGBM and dask.distributed.
This module enables you to perform distributed training with LightGBM on
dask.Array and dask.DataFrame collections.
It is based on dask-lightgbm, which was based on dask-xgboost.
"""
import operator
import socket
from collections import defa... |
cd551a176decf7624465d6737d914593f481edd53d34e6cc92ddc2079ce34ddc | Python | 116,895 | 2,942 | """Tests for AIMNet2Calculator."""
import inspect
import warnings
from unittest.mock import Mock
import numpy as np
import pytest
import torch
from conftest import CAFFEINE_FILE, load_mol
from aimnet.calculators import AIMNet2Calculator
from aimnet.modules import D3TS, DFTD3
class TinyLegacyModel(torch.nn.Module):... |
faa737ba846b0b58e9883f86cbaed654589e23f6c819565be467613c907d0f6c | Python | 117,718 | 661 | """ TorchScript metadata script """
import json
import logging
import os
import platform
import re
import sys
import warnings
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(root_dir)
sys.pycache_prefix = os.path.join(root_dir, "dist", "pycache", "pytorch_script")
source_dir = ... |
ce8d45037078963696302c3092adcbd3c39bb7a407c46c6e1045124fb0c52682 | Python | 118,939 | 2,961 | import numpy as np
from numpy import nan
import warnings
import sys
import types
import scipy.optimize
import scipy.special as ss
from .statistics import *
from .plotting import *
from .utils import *
class Distribution(object):
"""
An abstract class for theoretical probability distributions.
Can be cr... |
9da4da2818fdee3138a45063dbdcd301ea2fee9433ee7a2c698b99707ea95e04 | Python | 122,677 | 2,643 | # -*- coding: utf-8 -*-
# elements.py
# Copyright (c) 2005-2015, Christoph Gohlke
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyri... |
4cefe64c49de04c58754696d1542f47ab81976e68d59cc97503759b44f828efe | Python | 130,856 | 3,763 | """Various functions."""
import os
import sys
import re
import string
import math
import io
import random
import glob
import time
import pickle
import random
import inspect
import datetime
import subprocess
from p4.var import var
# from p4.sequencelist import Sequence, SequenceList
import p4.sequencelist
from p4.align... |
959792838898cc1b249fdac59ab4fdfcbe333a499eb5cb9ac87cffb7a873b367 | Python | 133,812 | 3,527 |
# coding: utf-8
# In[1]:
import cv2
import re
import numpy as np
import matplotlib
#matplotlib.use('agg')
from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size
from mpl_toolkits.axes_grid1 import SubplotDivider, Size
from mpl_toolkits.axes_grid1.mpl_axes import Axes
... |
747a2cd66ac60818fc526f35cbbb5229d43746e10a0ab53ceafbfd106823525a | Python | 134,974 | 3,046 | from p4.p4exceptions import P4Error
import p4.func
from p4.func import read
from p4.var import var
from p4.tree import Tree
from p4.node import Node, NodeBranch
import sys
import random
import copy
from p4.pnumbers import Numbers
import math
# I suppose if there are input trees whose tax sets are equal to or subsets
#... |
1d9a69bba327f29c90ce8341dc2c60dc57a488159759a9462b39eb343e415009 | Python | 136,713 | 2,560 | ############################################
# imports
############################################
import os
import shutil
from itertools import product
from pathlib import Path
import numpy as np
import pandas as pd
import yaml
from Bio.SeqUtils import Seq
from oligo_designer_toolsuite._exceptions import Configura... |
052bed1daa5cb5c4f4d509e2dfa8a06819145485bcc6f655b178a323121bdff5 | Python | 136,734 | 2,757 | # coding: utf-8
"""Scikit-learn wrapper interface for LightGBM."""
import copy
import warnings
from inspect import signature
from pathlib import Path
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union
import narwhals as nw
import narwhals.dependencies as nwd
import narwhals.typing as ... |
d1ac6f60d047897367e50be9f13ac3881bcaa412eba712bba534aba473dafcba | Python | 140,786 | 3,821 |
# coding: utf-8
# In[1]:
import cv2
import re
import numpy as np
import scipy
import matplotlib
#matplotlib.use('agg')
from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size
from mpl_toolkits.axes_grid1 import SubplotDivider, Size
from mpl_toolkits.axes_grid1.mpl_axes... |
883ad8f0139e57934d7687ad0af582b3f305f6938dc0f5c046e3caf683b56240 | Python | 145,489 | 3,926 | import glob
import gzip
import os
import os.path
import subprocess
import sys
import tables
import numpy as np
import pysam
import find_intersecting_snps
def read_bam(bam):
"""
Read a bam file into a list where each element of the list is a line from
the bam file (with the newline stripped). The header is... |
3529dd631eea52a9646efbe52f552b637df4c624aacbb95cf894ff6b88ae1fd5 | Python | 145,744 | 3,974 |
# coding: utf-8
# In[1]:
import cv2
import re
import numpy as np
import scipy
import matplotlib
#matplotlib.use('agg')
from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size
from mpl_toolkits.axes_grid1 import SubplotDivider, Size
from mpl_toolkits.axes_grid1.mpl_axes... |
d12724d271ce4f0148baf7114904f250eb1b78e58aeb8464ee78e199bf13a4ae | Python | 146,032 | 3,425 | #################################################################################
#!/usr/bin/env python
# coding: utf-8
""" IMAGEN Post hoc analysis Helper in all Session """
# Author: JiHoon Kim, <jihoon.kim@fu-berlin.de>
# : Roshan Prakash Rane, <roshan.rane@bccn-berlin.de>
# Last modified: 17th January 2022
im... |
43628ba989d036db9ecf3b1df48ba8823ce0598fee88eab60fd950377f8ecf67 | Python | 148,594 | 4,224 | from p4.tree import Tree
from p4.node import Node
from p4.func import read
from p4.var import var
from p4.p4exceptions import P4Error
import sys
import csv
import operator
import time
multiProcessing = False
try:
from multiprocessing import Process as Process
from multiprocessing import Queue, cpu_count
... |
a9d6fca1217eef0ce96083ad910bb416d104b8815c9d57cfcfc807aba5953af1 | Python | 154,211 | 2,831 | ############################################
# imports
############################################
import os
import shutil
from itertools import combinations
from pathlib import Path
import numpy as np
import pandas as pd
import yaml
from Bio.SeqUtils import Seq
from scipy.spatial.distance import hamming
from oligo... |
b9e7274ed60d8c6cfbcce15a0df8120e4d4a9131f5fb6d98eb0d9e547d1bd1bb | Python | 160,071 | 3,748 | import p4.pf as pf
import p4.func
from p4.var import var
import math
import random
import string
import sys
import time
import copy
import os
import pickle
from p4.chain import Chain
from p4.p4exceptions import P4Error
from p4.treepartitions import TreePartitions
from p4.constraints import Constraints
from p4.node impo... |
436fdd6307c33468afd9762122af487b2c5b1bfb81711b61f3410b1958c2b3ad | Python | 166,545 | 3,996 | # This is STMcmc, for super tree mcmc.
# Started 18 March 2011, first commit 22 March 2011.
import p4.pf as pf
import p4.func
from p4.var import var
import math
import random
import string
import sys
import time
import copy
import os
import pickle
import glob
import numpy as np
from p4.p4exceptions import P4Error
from... |
0ce525cb74167a7475870a3319a1a9f06c05f8dd3495def88635296c8a363712 | Python | 171,722 | 4,467 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap, to_hex, to_rgb
from mpl_toolkits.mplot3d import Axes3D
import tkinter as tk
from tkinter import filedialog, messagebox, colorchooser
import os
import sys
from copy import copy
from mat... |
e879d69d36bf953be8f1dc72f8b4c4042611ae0cfe3fe5370f6d2449a7120751 | Python | 191,224 | 5,037 | import os
import sys
import pandas as pd
import requests
import json
try:
from StringIO import StringIO ## for Python 2
except ImportError:
from io import StringIO ## for Python 3
import numpy as np
import re
import seaborn as sns
import matplotlib
from matplotlib import pyplot as plt
from sklearn.metrics impo... |
2741880d14ef54f39b023ae55a6fa76c206b60d331863c21e212057ed146c6ff | Python | 200,000 | 5,088 | import sys
import string
import io
import math
import copy
import os
import p4.func
import time
import glob
from p4.var import var
from p4.p4exceptions import P4Error
from p4.node import Node, NodePart, NodeBranch, NodeBranchPart
from p4.nexustoken import nextTok, safeNextTok
from p4.distancematrix import DistanceMatri... |
383de0c8d9ab551d87d3d0cc132175da68a53a77337ac74a63d6777ccd536d18 | Python | 200,000 | 5,227 | # coding: utf-8
"""Wrapper for C API of LightGBM."""
# This import causes lib_lightgbm.{dll,dylib,so} to be loaded.
# It's intentionally done here, as early as possible, to avoid issues like
# "libgomp.so.1: cannot allocate memory in static TLS block" on aarch64 Linux.
#
# For details, see the "cannot allocate memory ... |
4f45fee78572a0a355137ee8ed65c92d30b608ca94bbbff66d065bff307fc487 | Python | 200,000 | 4,650 | import p4.func
import p4.pf as pf
from p4.var import var
import math
import random
import copy
import numpy
import scipy
import scipy.stats
from p4.p4exceptions import P4Error
import sys
#localCalls = 0
class Chain(object):
def __init__(self, aMcmc):
self.mcmc = aMcmc
#self.num = -1
sel... |
5a6bca56f59806f97c62b30f0f8c6ad7b1496727972b8f47cd92854d6b5b3852 | Python | 200,000 | 6,469 | """
Pre-computed downstream task scores from high-frequency sleep staging features.
This file stores results from experiments that use high-frequency sleep stage
predictions (with temporal resolution finer than 30 seconds) as features for
downstream tasks like age prediction and subject classification.
Data Generatio... |
5be7adc4bf504b8664a7a638dce2658bd21d8ed5b3fd52457d963e8a11e1a6e0 | Python | 200,000 | 5,058 | from p4.sequence import Sequence
from p4.sequencelist import SequenceList
from p4.nexussets import NexusSets
from p4.p4exceptions import P4Error
import string
import copy
import os
import math
import p4.func
import re
import sys
import random
from p4.nexussets import CharSet
import subprocess
from p4.distancematrix imp... |
0eae2b422ce8e0fd35b662a15be8b3d58c88b03dfb2745586f1d6201ec4e06e5 | Python | 200,002 | 5,374 | #! /usr/bin/python3
# -*- coding: utf-8 -*-
# tifffile.py
# https://www.lfd.uci.edu/~gohlke/code/tifffile.py.html
# Copyright (c) 2008-2017, Christoph Gohlke
# Copyright (c) 2008-2017, The Regents of the University of California
# Produced at the Laboratory for Fluorescence Dynamics
# All rights reserved.
#
# Redistri... |
0948dffd3155e38d4f404c859ac814c225265b27a86fc8d5c8772164129bc57e | Python | 200,008 | 4,968 | # coding: utf-8
import copy
import itertools
import json
import math
import pickle
import random
import re
from pathlib import Path
from shutil import copyfile
import numpy as np
import psutil
import pytest
from scipy.sparse import csr_matrix, isspmatrix_csc, isspmatrix_csr
from sklearn.datasets import load_svmlight_f... |
d175d0f778f2b06debc01a6f31df49ddb23ff72819a418d4ee6789d3c6e109ea | Quarto | 7,954 | 215 | ---
title-block-banner: true
title: "Computation of Haralick features (texture analysis) from PDGFR-β in defined ROIs"
subtitle: "Batch processing Python script"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- n... |
bf85ca907d70a3907995093fed2787e891a52eebb6573ff3777dc97167170dc3 | Quarto | 8,091 | 228 | ---
title-block-banner: true
title: "Morphological analysis of PDGFR-β+ cells in defined ROIs"
subtitle: "Batch processing Python script"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- name: Univerisity Laval
... |
67d42d820bfb1c7d62a3252d9b79840baa2b8e24b4547ec8113bffa238fac59c | Quarto | 10,295 | 295 | ---
title: "Data handling for Widefield PDGFR-β and GFAP-stained barain sections (Regions of interest)"
subtitle: "Data analysis notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- name: Univerisity Laval ... |
26be66785fbe4471f401643b5088ae9b16e5b16accf7e7d6fd2036d75cc29f3b | Quarto | 11,255 | 325 | ---
title-block-banner: true
title: "Point pattern analysis (PPA) of PDGFR-β and GFAP - Striatal lesions"
subtitle: "Data analysis notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- name: Univerisity Lava... |
4cb8d24003bd19a06d86b059c6fc473ea0765affe87cd71bae1be6086d84fd4f | Quarto | 12,581 | 394 | ---
title-block-banner: true
title: "Analysis of PDGFR-β-low and PDGFR-β high+ cells in the ipsilateral hemisphere (striatal-only lesions)"
subtitle: "Data analysis notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliatio... |
8e747fb119a59071c5512b50495cfdda28549a4a1f7f64ef5fa02d5f29ae7e8c | Quarto | 14,490 | 456 | ---
title-block-banner: true
title: "Analysis of Picosirius staining (Collagens) in defined ROIs of the ipsilateral hemisphere of PDGFRβ^KLF4-KO mice"
subtitle: "Data analysis notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
... |
836d06218111ed21a93587a9462b81fee4f0f0764a5fc51cefcaf2de386463f4 | Quarto | 15,617 | 488 | ---
title-block-banner: true
title: "Analysis of Collagen-IV expression in the ipsilateral hemisphere of PDGFRβ^KLF4-KO mice"
subtitle: "Data analysis notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- na... |
15d7220cd4d6ea9b8f54de399aa77bbaed9c60e8bcbd6ea7ac1aa1363be20abf | Quarto | 16,047 | 621 | ---
title-block-banner: true
title: "FACS analysis of PDGFR-β+ live/deat cells"
subtitle: "FACS processing notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- name: Univerisity Laval
department: P... |
6521d422880051ca79d3e24f856b6031fbbeca4c920b8848c866f5d6bc59f5fd | Quarto | 16,138 | 571 | ---
title-block-banner: true
title: "Analysis of GFAP coverage (convex hull) of the ischemic hemisphere"
subtitle: "Data analysis notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- name: Univerisity Laval... |
1869ae97465ce8629f4e10ac1124e8c9365791ab7a607618175b620996fca199 | Quarto | 16,527 | 525 | ---
title-block-banner: true
title: "Analysis of PDGFR-β-low and PDGFR-β high+ cells in the ipsilateral hemisphere"
subtitle: "Data analysis notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- name: Univer... |
ab73302afe3e3f9bc881d311bcc45419ea93bb60e66b235f7c9822a5e337830d | Quarto | 17,469 | 683 | ---
title-block-banner: true
title: "FACS analysis of PDGFR-β+ live/deat cells"
subtitle: "FACS processing notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- name: Univerisity Laval
department: P... |
17a8f7429f58d1c12d6242952cf2a150afae76371a379adc02d04f7de580dfd7 | Quarto | 17,969 | 641 | ---
title-block-banner: true
title: "Analysis of Ki67/PDGFRβ colocalization in the ipsilateral hemisphere"
subtitle: "Data analysis notebook"
date: today
date-format: full
author:
- name: "Daniel Manrique-Castano"
orcid: 0000-0002-1912-1764
degrees:
- PhD
affiliation:
- name: Univerisity Lav... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.