sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
ee1a4eed9d3df09e38f0ccf937c1b162a5ff24c98d6aa06e5f2565ac87988b23
Python
45,524
1,538
# -*- coding: utf-8 -*- """ Created on Fri Oct 23 12:31:28 2020 @author: Xingyan Liu """ import logging from typing import Union, Mapping, Sequence, Optional, Callable from pathlib import Path import networkx as nx import numpy as np import pandas as pd from scipy import sparse from sklearn import metrics import scan...
7b1c354cd04ea374b7296dc43664cad59936ff7557a579051c5484332fe5a560
Python
45,550
976
#!/usr/local/bin/env python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ Test custom integrators. """ #=============================================...
6a9672d479c67b3ff15169b2b1b161155c7ac78e35cc1fcc5624a16b4a01d875
Python
45,582
1,025
"""Structure(s) and functions for working with alignments of sequences. """ from collections import defaultdict import logging import statistics import numpy as np from math import log2 from easyDesign.utils import guide from easyDesign.utils import lsh from easyDesign.utils import predict_activity logger = logging...
d773b6be4093935e56b216b672fa3251b1675a2f03fa194cff57071844b8d572
Python
45,602
972
# !! # * don't forget to get rid of the old gens/utils for syns (see the old skeleton) # * make sure we export each "Reduced*" template somewhere # * maybe replace everywhere: # * exportOptions.isExportGapJuncs -> exportOptions.isExportAnyGapJuncSets() # * exportOptions.isExportSyns -> exportOptions.isExportAnySyn...
fccd930dba4efb17054471ff012536f8466a4f45607762c5a764b9e2ec13556d
Python
45,617
1,194
import os os.environ["CUDA_VISIBLE_DEVICES"]="1" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, SumMultiplication...
a21d136af8c65e5632b10911e5b4f6821b264ba12abe1b86afaa01a422ad1d60
Python
45,620
1,194
import os os.environ["CUDA_VISIBLE_DEVICES"]="1" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, SumMultiplication...
19e6608c2ce6f4bd7268eed110f965a19be9bff96f91b961cf2f928abe726a48
Python
45,639
1,221
import os os.environ["CUDA_VISIBLE_DEVICES"]="0" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, SumMultiplication...
2d358818ec0841e350d514a13b29a045c91eae336917416d680a0854c6156c2f
Python
45,668
1,221
import os os.environ["CUDA_VISIBLE_DEVICES"]="1" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, SumMultiplication...
cee47f171eeee4bfb99a2bb9153ebf3b3b0113206121d17b4e2515196340bbc2
Python
45,672
1,155
from cgatcore import pipeline as P from Bio import Entrez import numpy as np import httplib2 import sqlite3 from intermine.webservice import Service as SS import string import re import os import xml.etree.ElementTree as ET import pandas as pd import cgatcore.experiment as E import cgatcore.iotools as iotools from urll...
f5258eba49d7baabb3eff46338f01dc7b90de0b00cc28514f6b27c7b80016989
Python
45,692
1,540
# -*- coding: utf-8 -*- """ Created on Fri Oct 23 12:31:28 2020 @author: Xingyan Liu """ import logging from typing import Union, Mapping, Sequence, Optional, Callable from pathlib import Path import networkx as nx import numpy as np import pandas as pd from scipy import sparse from sklearn import metrics import scan...
9c9543e82cea7f4f15f02c80f20f2b9397374a2bb4d65d2cf10e42ce97e67dae
Python
45,746
1,176
import torch from torch import nn from torch.autograd import Variable import torch.nn.functional as F from torch.autograd import Function from .utils.stochastic import GaussianSample from .utils.distributions import log_normal_standard, log_normal_diag, log_gaussian from .utils.utils import to_categorical import pandas...
09205b07244f9ebccddcd7227276649c6e57d1ee1832c1aafcba8b2b818cd04a
Python
45,770
1,226
import os os.environ["CUDA_VISIBLE_DEVICES"]="2" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, SumMultiplication...
29639578395a5d73c15c37aa50e6d3ba9e65ecd5b5ba7be1460e25cf959b5ef8
Python
45,975
1,454
import sys from collections.abc import AsyncIterator, Iterator from typing import Any import pydantic import pytest from pydantic import BaseModel, Field, ValidationError from langchain_core.exceptions import OutputParserException from langchain_core.messages import ( AIMessage, AIMessageChunk, BaseMessag...
fe7ed69dc1675eb918f050c9d97527ce0eecb98ede430ce2c758d91c6f5f6dcc
Python
46,023
1,061
''' This module provides restricted Boltzmann machines (RBMs) with different types of units. The structure is very close to the mathematical derivations to simplify the understanding. In addition, the modularity helps to create other kind of RBMs without adapting the training algorithms. :Implemented...
a013c8d3d81cf45d2a4483e84c24e47cdaac2d5927bd4b92c92ee611e1230d3c
Python
46,050
1,511
""" =============================== Transcriptome analysis pipeline =============================== :Author: Andreas Heger :Release: $Id$ :Date: |today| :Tags: Python The transcriptome analysis pipeline examines various gene/transcript sets and attempts to interprete and compare them. Among the quantities that it com...
22970746dce9d70ab65f15ce1e0c4a47a2a927a15d96ef060a1b5074de1de355
Python
46,066
1,234
import os os.environ["CUDA_VISIBLE_DEVICES"]="0" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, SumMultiplication...
5e07ead5549753b0e3a234cd9462cdf34ba8128be3fb08cd6cadc5680528c835
Python
46,067
1,352
"""======================================== RNA-Seq Differential expression pipeline ======================================== The RNA-Seq differential expression pipeline performs differential expression analysis. It requires three inputs: 1. A geneset in :term:`gtf` formatted file 2. Mapped reads in :term:`ba...
6709ef83c8bfd3cbfcfe50508bc0599f0b1b6f28f645cd1ad9bda7e325495ed3
Python
46,170
1,181
# coding=utf-8 """Defines the network test suite.""" import torch from torch.utils import data import math import numpy as np from sklearn import metrics as skl_metrics import pandas as pd from .utils import round_list, _get_probs, _filter_matched_subj from ..plotters.visualization import display_confusion_matrix fro...
90371f5ff6e4fadebdb4d2cff7230a4f7acae79be857aafc1560b3b7f4c0cb4d
Python
46,403
1,265
from __future__ import print_function import time, re, json, sys from collections import Counter from svtyper.statistics import mean, stdev, median, upper_mad # ================================================== # VCF parsing tools # ================================================== def confidence_interval(var, tag...
61322c0c0bf15ae279c6393216efb59fc8eaf4c4b4ddb9bc9b96563f9d215d6f
Python
46,471
1,213
import torch from torch import nn from torch.autograd import Variable import torch.nn.functional as F from torch.autograd import Function from bernn.dl.models.pytorch.utils.stochastic import GaussianSample from bernn.dl.models.pytorch.utils.distributions import log_normal_standard, log_normal_diag, log_gaussian from be...
9def32a05c291b90e76903d0f0e6c30b9970af971e9014cbaa31e14d4eb0ab19
Python
46,535
1,644
'''geneset.py - Tasks for processing gene sets ====================================================== Most of this tasks take a geneset (.gtf.gz) from ENSEMBL as input. As of ENSEMBL release 75 the gtf file contains both transcripts but also untranscribed features such as pseudo genes, for example:: 1 pseud...
c91c8b5ef05ec95c198c455db44058d5ef431465535aab36fb8bdccd5517dcc0
Python
46,573
1,487
# Copyright 2021 AlQuraishi Laboratory # Copyright 2021 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
9972ee7c8bc7e65c305125e54e62c663b17d00472b5948ed8ceddb64279c4794
Python
46,656
1,169
import torch from torch import nn from torch.autograd import Variable import torch.nn.functional as F from torch.autograd import Function from bernn.dl.models.pytorch.utils.stochastic import GaussianSample from bernn.dl.models.pytorch.utils.distributions import log_normal_standard, log_normal_diag, log_gaussian from be...
8514ca6a06cc66f82fabbd1ae31fdd8d813b0e5c9efdf53d23f9a653f9502204
Python
46,971
978
# Implementation of the filters is borrowed from paper "Alias-Free Generative Adversarial Networks (StyleGAN3)" https://nvlabs.github.io/stylegan3/ # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary righ...
ce545dc62982219ecbe56460b9bd29acf694719164ea374b89fe56bf0d5dc8a6
Python
47,026
1,529
""" ================ Genesets Pipeline ================= Overview ======== This pipeline generates a number of annotations that can be used with downstream cgat pipelines. The user will download a GTF from ENSEMBL and then the GTF is parsed and filtered. In addition to downloading an ensembl GTF the user will need to...
f4edbb623481f41e6aab639dab15e824a8084b7c5c797d4aa032d61755612b47
Python
47,173
1,240
"""Tests for the CMTK/elastix transform backends. navis runs CMTK and elastix point transforms through navis-fastcore's in-process Rust implementation. The deprecated `"binary"` backend shells out to the external binaries (`streamxform`, `transformix`) instead, and is kept until 3.0. Two kinds of test live here: * B...
732490e47729fca27a7bb41fae7907700f5c2d69551502c7f8b716eaf5e0798c
Python
47,268
900
# Copyright (c) 2008-2026 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Covered Software is provided under this License on an "as is" #...
c9bd1275e7a434d192897aa4479b9b3fd9ed9fe18e6ad23c75c3015690228aa0
Python
47,342
983
# Implementation of the filters is borrowed from paper "Alias-Free Generative Adversarial Networks (StyleGAN3)" https://nvlabs.github.io/stylegan3/ # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary righ...
205ebcd896b24d5aadd7d4404e832e9216eeb6461beab062f740f52e9833cbd7
Python
47,343
1,190
# This script is part of pymaid (http://www.github.com/navis-org/pymaid). # Copyright (C) 2017 Philipp Schlegel # # 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 3 of ...
a6aaebc2782a9181100c71183af76337e8db9e216fb71af700b394e5cd4c9ac2
Python
47,393
1,456
import json import pickle import re import tempfile import time import unicodedata from collections import Counter from datetime import datetime, timedelta, timezone from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from i...
2a88767b7cea5fcd6dbaefa02c7a76dc211a87b850fc659d7ae88eaa4ae43533
Python
47,468
823
import click import logging import os from pathlib import Path from data import DataLoad from utils import Utils from model import Models import numpy as np import matplotlib.pyplot as plt from Download import downloader from pathlib import Path import seaborn as sns from sklearn.model_selection import train_test_split...
65202c42c2e43fe7ba3b008e74bf166cf02185d7d22f7d6e6880e02647424655
Python
47,630
1,214
import torch import numpy as np from omegaconf import DictConfig, OmegaConf from rfdiffusion.RoseTTAFoldModel import RoseTTAFoldModule from rfdiffusion.kinematics import get_init_xyz, xyz_to_t2d from rfdiffusion.diffusion import Diffuser from rfdiffusion.chemical import seq2chars from rfdiffusion.util_module import Com...
a37ed51c2332318cf0f863fe51b5a20841839157c15216c8265f8b87a2d66591
Python
47,662
1,058
# -- coding: utf-8 -- # @Time : 2022/10/17 15:32 # @Author : Biao Zhang # @Email : littlebiao@outlook.com # @File : pipeline.py import os.path import scanpy as sc, anndata as ad import numpy as np import pandas as pd from sklearn.cluster import KMeans from sklearn.metrics import adjusted_rand_score import matplotlib.p...
caf6db1ea17854dd727c6eba783ae055d1082872132678ca474a32bb7ded60fa
Python
47,734
1,258
import os os.environ["CUDA_VISIBLE_DEVICES"]="0" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, SumMultiplication...
49aa86ff6679b024022cd4a3a0d3273a0ca815d916321624c4337a47a73b2a61
Python
47,839
972
import torch import numpy as np from typing import Union, Any from gymnasium.utils import seeding from motornet.skeleton import TwoDofArm, PointMass from motornet.muscle import CompliantTendonHillMuscle, ReluMuscle class Effector(torch.nn.Module): """Base class for `Effector` objects. Args: skeleton: A :clas...
98e83aa0996575a99aca1d8cc596156f8b68f4aa880aebeceabd44e29e56d0b9
Python
47,854
935
#!/usr/bin/python3 # Allow direct execution from the repository root, e.g. # ``python bernn/dl/train/train_ae_classifier_holdout.py``. import sys from pathlib import Path _repo_root = Path(__file__).resolve().parents[3] if str(_repo_root) not in sys.path: sys.path.insert(0, str(_repo_root)) import os import trace...
187484995372d1f4372dc31ff67294b7bd3aa51674d6f437ecfff75e0ae411f7
Python
47,914
1,052
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ train_ae_head_sweep.py ====================== Optuna sweep: jointly optimise AE encoder hyperparameters **and** the classification head type/hyperparameters. Design ------ Each Optuna trial: 1. Trains the AE encoder with the trial's hyperparameters (layer sizes, ...
60625e35deb2d525a91392ea8f8e3b0653b53ea8439fec4b62095a83611f1217
Python
47,950
1,517
''' PipelineChipseq.py - ChIP-Seq tasks associated with intervals. ============================================================== .. note:: This module is obsolete, see PipelinePeakcalling.py instead ''' import shutil import random import re import glob import os import collections import sqlite3 import pysam im...
4447c6860e7347fa622d269fedb8758e66fce341ea7bc786a058b6ece1752705
Python
47,972
1,242
eval_latent=False import os os.environ["CUDA_VISIBLE_DEVICES"]="0" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, ...
5b11996e352b4176369a01939ab7b956bc58eeaa9d0c971b7d20bf8e8ddfb8fc
Python
47,984
1,242
eval_latent=False import os os.environ["CUDA_VISIBLE_DEVICES"]="2" import sys sys.path.insert(0,"/examples") from modulusDL.models.arch import ( CustomModuleArch, FullyConnectedFlexiLayerSizeArch, CaseIDtoFeatureArch, CaseIDArch, FixedFeatureArch, MaxPoolArch, MatrixMultiplicationArch, ...
20f7ab7e77033f3eda7e521a859d49422881898b25dbc8ab33fdeba6fe032a8e
Python
48,115
1,339
""" Write ``gt_coeffs`` into a **coeffs-only sidecar LMDB** (same shard keys as ``lmdb_in``). The main LMDB is read-only. Each sidecar entry stores a pickled ``gt_coeffs`` tensor (small) keyed ``"0"`` … ``"N-1"`` plus ``"length"`` per shard. Resume: ``--skip_existing`` skips graphs (or whole shards) already present i...
2b1c4468898f6be39b05ef3a70fc8b324dc78c37821ac35004f78184c95964b0
Python
48,211
1,207
#################################################################################### # # STEPS - STochastic Engine for Pathway Simulation # Copyright (C) 2007-2026 Okinawa Institute of Science and Technology, Japan. # Copyright (C) 2003-2006 University of Antwerp, Belgium. # # See the file AUTHORS for detai...
f1b9848d85d2f35fe63ae6cabd9802522e27a0d84c5960ac27b6c4a9d6c4146d
Python
48,279
1,156
""" This module provides the selene-based utilities for training and using Orca sequence models for multiscale genome interaction prediction. This module contains code from selene. """ import os from collections import namedtuple import pkg_resources from functools import wraps import pandas as pd import numpy as np...
3fd1e0bfb64a13128f9ae807bf4e2ac74fc67e69c7f7dc9f76512c1648261c03
Python
48,295
1,158
""" This module provides the selene-based utilities for training and using Orca sequence models for multiscale genome interaction prediction. This module contains code from selene. """ import os from collections import namedtuple import pkg_resources from functools import wraps import pandas as pd import numpy as np...
defb884e418202588cd08b24f29e038bf7f9207e2e6b1c6fd46bba83b25b2823
Python
48,323
1,500
"""Dataset accumulation and main analysis """ from collections import defaultdict from itertools import combinations, product from sklearn.linear_model import LinearRegression import numpy as np from sklearn.preprocessing import PolynomialFeatures, Normalizer from sklearn.pipeline import Pipeline import inspect from ...
1d61484d80013cca8fbe738e990722b88743367f0d6a507668517d0a4de2ba2b
Python
48,344
1,173
import numpy as numx from scipy.signal import convolve2d import pydeep.base.numpyextension as numxExt import pydeep.misc.io as IO import pydeep.misc.visualization as VIS from pydeep.base.activationfunction import Sigmoid #from sklearn.linear_model import LogisticRegression # Set the same seed value for all algorithm...
71fb9853fc1cbb26ade43d03084635daa5bb23f5a1a7015388306beaf5ec6e71
Python
48,523
1,537
""" 2023.08.30 author: femke.hurtak@epfl.ch Helping script for working with the connectivity graphs """ import pandas as pd import networkx as nx import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np from scipy.sparse.linalg import svds from scipy import sparse import seaborn as sns fr...
e85e9f3689380d11eb059e905efdb41410e87265648e19163ad15cf65604576a
Python
48,733
1,182
import torch from torch import nn from torch.autograd import Variable import torch.nn.functional as F from torch.autograd import Function from typing import Optional, Tuple, Any, List from bernn.dl.models.pytorch.utils.stochastic import GaussianSample from bernn.dl.models.pytorch.utils.distributions import log_normal_s...
740f2f87fd98d60bb058b4e8714059ebc2472671f7cfaeade0cdcb670393d824
Python
48,764
983
from KineticAssembly_AD.vectorized_rxn_net import VectorizedRxnNet from KineticAssembly_AD import ReactionNetwork import numpy as np from torch import DoubleTensor as Tensor from torch.nn import functional as F import torch import pandas as pd from matplotlib import pyplot as plt import matplotlib.colors as mcolors im...
43f81895c29d819f88a4d8a7b0e728e1603bdad4a6c34a200b10c7abe3b190b4
Python
48,895
1,167
# Copyright Generate Biomedicines, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
473edc01563c4e8c917593ba66a4e683f08ab4806853947f21507868a5920bd4
Python
48,917
984
from KineticAssembly_AD.vectorized_rxn_net import VectorizedRxnNet from KineticAssembly_AD import ReactionNetwork import numpy as np from torch import DoubleTensor as Tensor from torch.nn import functional as F import torch import pandas as pd from matplotlib import pyplot as plt import matplotlib.colors as mcolors im...
38c222d79e3dd6ef4f465870b40f1fbdd6e97b6987c6c3e53c583a63ac0f47d8
Python
49,052
1,457
import uuid from typing import Any, get_args import pytest from langchain_core._api import LangChainDeprecationWarning from langchain_core.documents import Document from langchain_core.load import dumpd, load from langchain_core.messages import ( AIMessage, AIMessageChunk, BaseMessage, BaseMessageChun...
a5243e2fe0cc82503101f6d7072a24d74bd1c552dfc299152ee2373e0db8b525
Python
49,106
1,153
# This script is part of pymaid (http://www.github.com/navis-org/pymaid). # Copyright (C) 2017 Philipp Schlegel # # 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 3 ...
89104f6386c67879d6730578d2c4d6446adca76ce130ef246f22fa9fbd9ca409
Python
49,191
1,123
""" Hebb-layers. :Version: 2.0.0 :Date: 04.07.2018 :Author: Jan Melchior :Contact: JanMelchior@gmx.de :License: Copyright (C) 2018 Jan Melchior This program is free software: you can redistribute it and/or modify it under the terms of th...
4a42c408f3e69cb3b2d690c68623cb37ddafb02d3d45ddc351600d77d625e70d
Python
49,312
1,504
import typing from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence from typing import Annotated as ExtensionsAnnotated from typing import ( Any, Literal, TypeAlias, ) from typing import TypedDict as TypingTypedDict import pytest from pydantic import BaseModel as BaseModelV2Mayb...
6f6ddaaca01952af56e5b8ec1a9001f8172f03caf149989110efb9eb474ec466
Python
49,331
1,243
from equivariant_diffusion import utils import numpy as np import math import torch from egnn import models from torch.nn import functional as F from equivariant_diffusion import utils as diffusion_utils # Defining some useful util functions. def expm1(x: torch.Tensor) -> torch.Tensor: return torch.expm1(x) def...
8aa3e67ab09c1465c50622538b542fdcf712dc760aea02523e9945aeb1b3859d
Python
49,342
1,148
import warnings import math import numpy as np from pensa.features import \ correct_angle_periodicity, \ correct_spher_angle_periodicity, \ get_multivar_res_timeseries from pensa.statesinfo import \ calculate_entropy, \ calculate_entropy_multthread, \ determine_state_limits # -- Functions to c...
37c890c1147ecc6700474c9ac4ac53b214f24d4a541be2869b3e1ddfcd9a721c
Python
49,350
1,547
""" ================================ pipeline_timeseries.py ================================ A pipeline for analysing RNAseq timeseries gene expression data Overview ======== A pipeline to perform time-dependent differential expression and hierarchical clustering of timeseries RNA-seq data. Input files are bam file...
a49d316c5f1640740fdd7fde0441308fd802703b44642042b4c414fbbaef8cd0
Python
49,394
879
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Mar 15 09:42:12 2024 @author: baran """ #Importing packages import numpy as np import mat73 import pandas as pd from tqdm import tqdm from sklearn.decomposition import PCA from scipy import stats from scipy import signal from matplotlib import pyplot a...
841f95e8d47fd1bc27f50b76f605bf6d0369308c68c7a65b199e51b00b30d8ef
Python
49,401
1,190
import math from typing import Dict import numpy as np import torch from torch import nn import torch.nn.functional as F from torch_scatter import scatter_add, scatter_mean import utils class EnVariationalDiffusion(nn.Module): """ The E(n) Diffusion Module. """ def __init__( self, ...
5ac441d19741d1c2b6190045f9d31ac99b8250967ac593fecee402c4e035bbf9
Python
49,402
1,438
''' Timeseries.py - functions associated with analysis of time series data ====================================================================== :Author: Mike Morgan :Release: $Id$ :Date: |today| :Tags: Python Functions are split into:: * clustering assessment * data transformation and normalisation * differential...
197bd9c159e822f52731f8e3d61a8364585197e5697331a3c51cca8aedcd995b
Python
49,409
1,046
# Implementation of the filters is borrowed from paper "Alias-Free Generative Adversarial Networks (StyleGAN3)" https://nvlabs.github.io/stylegan3/ # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary righ...
cff22a60c1be56e54ec9d01912a9c558dae5054c80dbe8c4968ce7b35b9d279e
Python
49,440
991
import simtk.openmm.app as app import simtk.openmm as openmm import simtk.unit as unit from pkg_resources import resource_filename import numpy as np import os try: from urllib.request import urlopen from io import StringIO except: from urllib2 import urlopen from cStringIO import StringIO from nose.plu...
ba2e084f98f45313c273727c034d0a0d77c71444c74c2c952cdbdb331b7584fa
Python
49,731
1,237
from typing import Any, Optional, Tuple, List def _check_torch_available(): """Check if PyTorch is available and raise helpful error if not.""" if not TORCH_AVAILABLE: raise ImportError( "PyTorch is not installed. To use deep learning features, please install with: " "pip instal...
36f62a6d98f4a5047e45dd131012477d015b32564cf2e3c04cbddaba72c1bf94
Python
49,772
1,093
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ # FILE: scanatk.py # AUTHOR: Matthias A.F. Gsell # EMAIL: matthias.gsell@medunigraz.at # DATE: 02.2023 """ import os import json import numpy import pandas import itertools import tkinter import tkinter.ttk import tkinter.messagebox import tkinter.simpledialog import tk...
614d9f0f372608e1843433637e023021c4ac5b7251119a05cd115b7c73a6c272
Python
49,797
1,205
import numpy as numx from scipy.signal import convolve2d import pydeep.base.numpyextension as numxExt import pydeep.misc.io as IO import pydeep.misc.visualization as VIS from pydeep.base.activationfunction import Sigmoid # Set the same seed value for all algorithms numx.random.seed(42) class Weight_layer(object): ...
ff4c4cc1fc03499c38e4b7880d14e0c387288ea890d1ab90f34bee3983ec6ade
Python
50,170
1,286
""" all of this file except LBFGS class is from https://github.com/hjmshi/PyTorch-LBFGS/blob/master/functions/LBFGS.py """ import torch import numpy as np import matplotlib.pyplot as plt from functools import reduce from copy import deepcopy from torch.optim import Optimizer from optimization.EPIOptimize import EPIOpt...
1d087bf6bdfbb6e99c27a1a340f7117e015425da1cc45506d3b2dc0292851ee7
Python
50,278
1,014
""" Module to generate figures related to functional imaging during optogenetic stimulation. Author: jonas.braun@epfl.ch """ import os import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.backends.backend_pdf import PdfPages import seaborn as sns fr...
920108cf948bce9055b84e33a8ee2cc76bfd6824bd16781364e17de7c24136fa
Python
50,306
1,128
from copy import copy import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import seaborn as sns from pycirclize import Circos def barplot(self, save=None, vector=True, dpi=300): """ Barplot Bar plot for proteins/genes identified and differentially regulated accord...
ba9c61b85b9296b61976d87979ad58dcd0e7ccc60795b7259d434e793f340052
Python
50,508
1,173
# Copyright (c) 2008-2026 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Covered Software is provided under this License on an "as is" #...
f00e1774e10e27204851de32c6fac52963220dad0f16c2a98af818a9e0eed7ea
Python
50,519
1,143
''' This module provides restricted Boltzmann machines (RBMs) with different types of units on CPU. The structure is very close to the mathematical derivations to simplify the understanding. In addition, the modularity helps to create other kind of RBMs without adapting the training algorithms. ...
8f805b74686751051414218950620825fb62c7aed16c3950a95f9874ea23aa9b
Python
50,581
1,162
import tensorflow as tf import numpy as np from utils.ProcessData import get_maxDims, gen_smiles2graph from sklearn.neighbors import KernelDensity from sklearn.utils import gen_batches from utils.TestModel import * from sklearn.utils import gen_batches import pandas as pd import time import matplotlib.pyplot as plt imp...
566c134409dda6a9eee701f5c0b0bf1f37c9f8dcb1c307577f40a11a61dd7eb4
Python
50,660
1,177
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 3 10:57:50 2019 @author: ngritti """ from PyQt5.QtCore import Qt, QUrl from PyQt5.QtWidgets import (QApplication, QComboBox, QVBoxLayout, QDialog, QGridLayout, QGroupBox, QLabel, QLineEdit, QPushButton, QFileDialog, QMessageBox, QTa...
c2b0558118868d5b4fbf25a660cb905588c9f1538ab1d731d4228a80e856ed9a
Python
51,261
1,592
from SMdRQA.utils import assert_3D_matrix_size from SMdRQA.utils import compute_3D_matrix_size from SMdRQA.utils import assert_matrix from scipy.spatial import distance_matrix from scipy.special import digamma from scipy.spatial import distance from sklearn.metrics import mean_squared_error from sklearn.model_selection...
69e0a07b75c1cb2e5b080be27c632c4b7929131b23a794d286a0b9764d7849e4
Python
51,345
1,497
"""PipelineTimeseries.py =============================== """ ############################################################# # Classes and functions for pipeline_timeseries_clustering.py ############################################################# import sys import os import itertools import math import numpy as np i...
479404e8b7018a0c0e5c1882deb112bd90896c704c98ce557298b16a3be31870
Python
51,377
1,075
""" Unit tests for NCMC switching engine. """ __author__ = 'John D. Chodera' ################################################################################ # IMPORTS ################################################################################ import copy from simtk import openmm, unit from simtk.openmm import ...
36e2bf54e8f58e15816758bbdc5d56875318652d907fc7c7d52d94f969c076b1
Python
51,475
1,056
import matplotlib from bernn.utils.pool_metrics import log_pool_metrics matplotlib.use('Agg') CUDA_VISIBLE_DEVICES = "" import uuid import shutil import matplotlib.pyplot as plt import pandas as pd import numpy as np import random import json import copy import torch from torch import nn import os import sklearn # ...
8728402ed9a1c7ed09077803f443f7acb6352c552fcdb9d177ff8bbeb741083d
Python
51,566
1,426
import pandas as pd pd.set_option('display.max_columns', None) import numpy as np import re import os, sys import random from scipy.stats import fisher_exact from gensim.models import KeyedVectors from mantis_ml.modules.pre_processing.data_compilation.process_generic_features import ProcessGenericFeatures...
8c5e1907206fc04d1ff14933bced8031e5774b5b42254a852a44a6daf1982d03
Python
51,612
1,227
""" Module for OmicScope Object Visualization This module allows the user to extract and visualize information from OmicScope object. Here, it is possible to evaluate data normalization (MA-Plot, Volcano Plot, Dynamic range plot), individual protein abundance (barplot, boxplot), search for protein-protein interactions...
13a46eb4a540a173b8d6de49d82ab5ae7523c6282ef31c3e646f23561a1dd890
Python
51,623
1,184
"""Obtain coverage pkl-objects and wiggle files of terminal exon coverage""" __date__ = "2016-07-11" __author__ = "Ralf Schmidt" __email__ = "ralf.schmidt@unibas.ch" __license__ = "GPL" # imports import sys import os import time import HTSeq from argparse import ArgumentParser, RawTextHelpFormatter from collections i...
299f1674bfb47ccd737f5b09ae8213fed7f54eeb40b367b69c7bb7bb1961df7d
Python
51,708
1,326
import tensorflow as tf import numpy as np from utils.ProcessData import get_maxDims, gen_smiles2graph from sklearn.utils import gen_batches import matplotlib.pyplot as plt import pandas as pd from sklearn import metrics def perform_validation(model,validation,val_metric,batchsize,nfeat): """ Test the model o...
ae55b5d46e5a00a917ae2970d080e1acd75c09f43a3c466658805e124214df2c
Python
51,724
1,717
"""================= Interval pipeline ================= The interval pipeline takes a several set of :term:`bed` formatted genomic intervals and annotates them. The intervals are expected to be non-overlapping, which the pipeline checks. It performs the following analyses: * Peak location - where is the read densi...
77d597f7bc67a68bc6a140b29f119ae2889d9da87092045cdb3c7db4d4412dfc
Python
51,846
1,042
import pytest import simtk.openmm.app as app import simtk.openmm as openmm import simtk.unit as unit from pkg_resources import resource_filename import numpy as np import os try: from urllib.request import urlopen from io import StringIO except: from urllib2 import urlopen from cStringIO import StringIO...
3cdde855c387ee18713a0ad2226e55e8d091f9a7f9f2649cfc4fae9f93b68554
Python
51,863
1,495
"""Chat prompt template.""" from __future__ import annotations from abc import ABC, abstractmethod from collections.abc import Sequence from pathlib import Path from typing import ( Annotated, Any, TypedDict, TypeVar, cast, overload, ) from pydantic import ( Field, PositiveInt, Sk...
30efa07b1a03977b92c4c3383f5ec29ef62981384037856af38080933ab17372
Python
52,025
1,019
''' Test module for RBM trainer. :Version: 1.1.0 :Date: 29.03.2017 :Author: Jan Melchior :Contact: JanMelchior@gmx.de :License: Copyright (C) 2017 Jan Melchior This file is part of the Python library PyDeep. PyDeep is free softw...
7a80e3e8d9540e9535be655acd57a1b9412a1b03d5caef70c36ffce7d8f44eb5
Python
52,034
1,048
import re import sys from typing import Tuple import networkx as nx import random import torch from torch import DoubleTensor as Tensor from torch import rand from torch import nn LOOP_COOP_DEFAULT = 1 def _equal(n1, n2) -> bool: """ Test whether two structures have identical connectivity :param n1: nx...
b80922c0e2ad9ef56e0951edf7c62a9f1afec6889d1de0a7ec98fee371a13f6f
Python
52,047
1,066
from typing import Tuple from KineticAssembly_AD import ReactionNetwork from KineticAssembly_AD import reaction_network as RN import networkx as nx import torch from torch import DoubleTensor as Tensor from torch import rand from torch import nn class VectorizedRxnNet: """ Provides a lightweight class tha...
1ec61f732a51596da29387aa7a41f64168c2d66cf6e971fc8b4d5c8db31fb789
Python
52,198
1,501
""" Least-squares projection of voxel / probe charge density onto the atom-centered GTO basis. Produces ``gt_coeffs`` in the **same raw tensor space as the eSCN readout before** ``predict_coeffs`` divides by ``sqrt(total_orbitals_in_graph))``: linear: rho_labels ≈ scale * Phi @ (gt_coeffs / sqrt(N_orb_sum)) ...
b5c94283063e6b5dcc2d9233408a63f806a52c5439c1d93e4105e3f6ff04aa6e
Python
52,233
1,078
from typing import Tuple from KineticAssembly_AD import ReactionNetwork from KineticAssembly_AD import reaction_network as RN import networkx as nx import torch from torch import DoubleTensor as Tensor from torch import rand from torch import nn class VectorizedRxnNet: """ Provides a lightweight class tha...
37e4ca471d764ab8f6e50bd1353c19383c3f2669fc834d55110f4724e1b64b93
Python
52,566
1,080
from typing import Tuple from KineticAssembly_AD import ReactionNetwork from KineticAssembly_AD import reaction_network as RN import networkx as nx import torch from torch import DoubleTensor as Tensor from torch import rand from torch import nn class VectorizedRxnNet: """ Provides a lightweight class tha...
fe2b2de49e00789a98f1a0914bde0665f381183c623b8000c57c048a26311745
Python
52,713
1,610
# Copyright 2021 AlQuraishi Laboratory # Copyright 2021 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
4c0c01524d54f6a46172985dd3834a9d6411febc6ffd7a0fd1130315c74ede08
Python
52,726
1,631
""" ==================== RNASeqQC pipeline ==================== Overview ======== This pipeline should be run as the first step in your RNA seq analysis work flow. It will help detect error and biases within your raw data. The output of the pipeline can be used to filter out problematic cells in a standard RNA seq...
6f389ea7019db59b7ffe8d64099e20cf74f7ce1fa5c7b5e123b79f9689c01ab5
Python
53,023
1,224
# -*- coding: utf-8 -*- """ ################################################ MIT License Copyright (c) 2021 L. C. Lee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including ...
72c4ce97c428273db78f960e8c9dc9348bcd249dd7d2d858099c1deaa0702d75
Python
53,155
1,058
import re import sys from typing import Tuple import networkx as nx import random import torch from torch import DoubleTensor as Tensor from torch import rand from torch import nn LOOP_COOP_DEFAULT = 1 def _equal(n1, n2) -> bool: """ Test whether two structures have identical connectivity :param n1: nx...
48058cd5d341214943c1b455444367cf787eff2ef56106a84d1066822a3a4fca
Python
53,373
1,203
#!/usr/bin/env python3 # coding: utf-8 """ Common source for utility functions used by ABCD-BIDS task-fmri-pipeline Greg Conan: gconan@umn.edu Created: 2021-01-15 Updated: 2024-01-19 (as_cli_attr); 2022-02-07 (the rest) """ # Import standard libraries import argparse from datetime import datetime # for seeing how lo...
ba5942418b2e879618b2af4fc2d6e2baeaf4c933aabe9e7f7b94365b6b898ca2
Python
53,532
1,637
# Copyright 2021 AlQuraishi Laboratory # Copyright 2021 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
4627af066aef8fdcc45b1ccc0344a50d9033f776edda85ea9e221a5e490884ba
Python
53,582
1,395
import os from os.path import join as opj import numpy as np import matplotlib.pylab as plt from PIL import Image from pandas import DataFrame, read_csv import torch.multiprocessing as mp import torch from glob import glob import shutil import logging import pyvips import time # histolab from histolab.slide import Sli...
4af3258acf820ee0a4cce86ea3d6de33ef2793dce8391493609ec34b0152415d
Python
53,595
1,197
#################################################################################### # # STEPS - STochastic Engine for Pathway Simulation # Copyright (C) 2007-2023 Okinawa Institute of Science and Technology, Japan. # Copyright (C) 2003-2006 University of Antwerp, Belgium. # # See the file AUTHORS for d...
e7794cc822b74627e65548214c6121436697f150681580a2c8adf5ea50536588
Python
53,715
1,197
#################################################################################### # # STEPS - STochastic Engine for Pathway Simulation # Copyright (C) 2007-2026 Okinawa Institute of Science and Technology, Japan. # Copyright (C) 2003-2006 University of Antwerp, Belgium. # # See the file AUTHORS for detai...
f48892db909049e18ebc8a89db460bf36fc920d31d3dbeaf939b9d72a40faea1
Python
53,745
1,053
# -*- coding: utf-8 -*- ModulePy = str('NMF_demixing__ProofOfPrinciple_v23_20240617.py') ''' Description: NMF analysis demixing spatio-temporal ensemble signals from Fiber Photometry ensemble video data (proof-of-principle analysis). - Input files: (i) raw_ensemble_video_data.mat [data_ddm...