sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
977b36cda1109ec7274075a2cfcbb4ed3251553bdeb58b2602e347b8b009306c
Python
75,152
2,377
# -*- coding: utf-8 -*- """ Created on Thu Aug 6 00:21:15 2020 @author: Xingyan Liu Functions for handling AnnData: * I/O functions * preprocessing - normalization / z-scoring / ... - groups / ... * statistics computation """ import logging import os from pathlib import Path from typin...
8717a590f0b018adef2f1b48f38963dcfe2e89bebb8d47f126478d43945a0291
Python
75,197
1,779
# Copyright 2024 DeepMind Technologies Limited # # AlphaFold 3 source code is 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...
15bce832440283d640cf92676d4888c489f97db142111fc6025c2f41d73ca07e
Python
75,486
1,602
# TODO update all 2p stim related attr's to naparm submodule import glob import os import signal import time import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy.stats as stats import tifffile as tf from packerlabimaging import TwoPhotonImaging from packerlabimaging._archive.classes imp...
d0ac003161a1a65eb9ed4d8a6ac0fa5a8d5e06004fbae147d619195072955bcf
Python
75,544
2,139
# Copyright 2024 DeepMind Technologies Limited # # AlphaFold 3 source code is 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...
2c87d9cc66b756dd2483ad90484e89fea94ce3f54fa443cba5f8b61df57828ed
Python
75,747
1,667
#!/usr/bin/env python3 import pytest from skbase.utils.dependencies import _check_soft_dependencies from pgmpy.base import ADMG, DAG, MAG, PDAG from pgmpy.base._base import _CoreGraph def sample_graph1(edge_type=None): """ Sample graph for testing node searching(`get_*`) method of `_CoreGraph` class. Te...
7b2e5b8082d4dd0f5b6e13ae27db81a7eba14fdf00b77fe0272d9170de91755d
Python
75,826
1,513
import simtk.openmm as openmm import os import copy import openmmtools.mcmc as mcmc import openmmtools.integrators as integrators import openmmtools.states as states from openmmtools import utils from openmmtools.states import ThermodynamicState import numpy as np import mdtraj as md import mdtraj.utils as mdtrajutils...
f9467bb1ac7a486e5be60f6791f9a3c4d96cc5f401e0dcc0521716f3c1e290f3
Python
76,963
2,110
from __future__ import annotations import itertools from collections.abc import Hashable, Iterable, Sequence from os import PathLike from typing import TYPE_CHECKING import networkx as nx import numpy as np import pandas as pd from pgmpy import logger from pgmpy.base._mixin_roles import _GraphRolesMixin from pgmpy.c...
fc458e9856b571fb852fc0f91d7e61869974c70de50821cef19b513c4b86970f
Python
77,168
1,549
# os.environ['CUDA_VISIBLE_DEVICES'] = '-1' # CUDA_VISIBLE_DEVICES = "" import os try: from tensorboard.plugins.hparams import api as hp except Exception: # Optional logging dependency. hp = None try: import tensorflow as tf except Exception: # Optional logging dependency. tf = None from sklearn.met...
209e74ac10c04f667f0067138426f2b7c6b44873ecc6d2d2832f331b4ce8ee84
Python
77,871
1,920
#!/usr/bin/env python """ COPYRIGHT AND LICENSE @author John D. Chodera <jchodera@gmail.com> All code in this repository is released under the MIT License. This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. This program is distributed in the hope that it wi...
9c1bd5f2eee18b9e6903b848b867f24336776c459a99009ba947e6ba7131a458
Python
78,626
2,022
''' PipelineRrbs.py - Utility functions for analysing rrbs sequence data ===================================================================== Mapping reads is a common task in pipelines. Different pipelines combine different sources of input (:term:`fastq` files, :term:`sra` files) of different data (single end, pai...
8c6b33a05b9c81d5787c7aab73dfb317ca87bb9304b6be27a1a9cfbdccdc61a8
Python
78,991
2,069
#!/usr/bin/env python # -*- coding: latin-1 -*- # **************************************************************************** # * Software: FPDF for python * # * Version: 1.7.1 * # * Date: 2010-09-10 ...
da526981028d9b2451539c2092697a91537937a20b14d3813af0efabf8572500
Python
79,491
2,003
""" Datasets. Usage: datasets.py [--root=root] --data=data Options: --root=root Root directory [default: ./data] --data=data Dataset name """ import time import jax import jax.numpy as jnp from jax import lax import diffrax import numpy as np import torch import matplotlib.pyplot as plt from scipy.i...
56688206dce0334e7ca82125d7b809c23427890c234dfd69123dad038a387f31
Python
80,410
2,201
"""Types for middleware and agents.""" from __future__ import annotations import warnings from collections.abc import Awaitable, Callable, Sequence from dataclasses import dataclass, field, replace from inspect import iscoroutinefunction from typing import ( TYPE_CHECKING, Annotated, Any, Generic, ...
9f9245690a81785db9c8603f383692964eeb1d7944ff735fb0fc8962d771004c
Python
80,532
2,712
"""=================================================== pipeline_windows - Window based genomic analysis =================================================== This pipeline takes mapped reads from ChIP-Seq experiments such has chromatin marks, MeDIP and performs analyses of the genomic read distribution. This contrasts w...
b857e86809381c56802c85359aa61d7fdef450174c81f785b79493281b337228
Python
81,014
2,131
# vim: fdm=indent # author: Joan Camunas # date: 16/08/17 # content: Dataset functions to correlate gene expression and phenotypes # Modules import numpy as np import pandas as pd from scipy.stats import rankdata import matplotlib.pyplot as plt import matplotlib as mpl import seaborn as sns #### #BASIC QC...
07882a5cde0505f59e0e79cd05c03aa121b3dcf2cfb5fefe7b32b2d9d265c729
Python
81,799
2,963
from collections.abc import AsyncIterator, Iterable, Iterator, Sequence from datetime import datetime, timezone from typing import ( Any, ) from unittest.mock import AsyncMock, MagicMock, patch import pytest import pytest_asyncio from pytest_mock import MockerFixture from langchain_core.document_loaders.base impo...
e2756361ad0f81647859f380cdb5b95ca1e6f8a8e063d0447da4a174908c1aa5
Python
81,950
2,326
""" ===================================================== Community analysis of metgenomic shotgun sequencing ===================================================== Pipeline_metagenomecommunities.py takes as input a set of fastq files from a shotgun sequencing experiment of environmental samples and assesses community...
9073b91cacab011faacc2f73ceb367bbeea6e75cca46c9de3987c283596a65dd
Python
82,341
2,470
"""================= ChIP-Seq pipeline ================= :Author: Andreas Heger :Release: $Id: pipeline_chipseq.py 2900 2010-04-13 14:38:00Z andreas $ :Date: |today| :Tags: Python The ChIP-Seq pipeline imports reads from one or more ChIP-Seq experiments and performs the following tasks: * align reads to the genom...
bd5122529861d6210410eab809dc623b5a01b7c656df93b668d2f68656638faf
Python
82,536
2,408
"""================================= RNA-Seq Transcript Build pipeline ================================= The rnaseq transcript build pipeline attempts build a variety of gene sets from reads mapped to a reference genome. This pipeline works on a single genome. Overview ======== The pipeline assumes the data derive...
e047679812fe556d74e1a47dbd297bf312c8ee0304d78fbae4b069f3245c85ba
Python
83,072
1,843
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri May 28 2021 @author: Simon Pelletier """ import os import csv from PIL import Image import torch import itertools import numpy as np from torch.utils.data import Dataset import random import pandas as pd from sklearn.preprocessing import minmax_scale as...
af60de4309b48578cc8cd0b6e809a4360469ef34395f90b81ed92720b2de7ff1
Python
83,303
1,725
import sys sys.path.insert(0,"../") import pandas as pd import numpy as np from sklearn import metrics from sklearn.linear_model import LogisticRegression from sklearn.neighbors import KNeighborsClassifier from sklearn.naive_bayes import GaussianNB from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble ...
19fc50a59de0e4517fed26f0cfc6e5cecff68156852118ade2e2871aa0eb39c8
Python
83,869
2,147
""" ==================== Exome pipeline ==================== The exome pipeline imports unmapped reads from one or more fastq or sra files and aligns them to the genome using BWA. Post alignment quality control is performed using Picard. The pipeline then performs local realignment around indels and base quality sc...
49b06b5390df6ad0150f54299abd62012715b95c6e5dd7c5df34d91e8b302e9c
Python
84,388
2,019
import math from copy import copy from pathlib import Path import numpy as np import pandas as pd import requests import torch import torch.nn as nn import torch.nn.functional as F from torchvision.ops import DeformConv2d from PIL import Image from torch.cuda import amp from utils.datasets import letterbox from utils...
27bb7647a7cb057c305984c520681bfbd95ef3cacc9d963201ec1aae618a2cc4
Python
85,019
1,803
# -*- coding: utf-8 -*- # author: Felix Repp felix.repp@mpikg.mpg.de # !/usr/bin/env python """@namespace tinaui \brief %This module provides the user interface for an easy usage of TINA using the tina_main.dataset container. Tinaui allow an easy usage of the tools as well as documentation of the process. They are ...
869041a4d0c95983b200a07d4e0bc3a50b2bcc5e2a722554f8a3f71bebea6290
Python
85,346
1,876
#!/usr/local/bin/env python # ============================================================================== # MODULE DOCSTRING # ============================================================================== """ Multistatereporter ================== Master multi-thermodynamic state reporter module. Handles all Disk...
48c3f149a28f73bbb246dedf6fe66a9f94630110c8512e9d40cbb1c6c41635dc
Python
86,683
1,855
""" Tools for computing atom mappings for relative free energy transformations. These tools currently require the OpenEye Toolkit, but will eventually be fully migrated to the OpenFF toolkit. .. todo :: This module should be migrated to openmmtools. """ from simtk import unit import copy import numpy as np ######...
cc4a7d9a620224558c4eddd4e13edc988a9ac9e328b7a67deeb71ed2c5ec5174
Python
87,471
2,164
"""Agent factory for creating agents with middleware support.""" from __future__ import annotations import functools import importlib import itertools import re from dataclasses import dataclass, field, fields from typing import ( TYPE_CHECKING, Annotated, Any, Generic, cast, get_args, get...
30a7f0bd0f4dd2d95d91c60a3a0fb3291c5cdfdbb66e7ccec2747cf60b9987a2
Python
87,950
1,886
__author__ = 'Patrick B. Grinaway' import simtk.openmm as openmm import openmoltools import simtk.openmm.app as app import simtk.unit as unit import logging import numpy as np import parmed from collections import namedtuple, OrderedDict import copy from unittest import skipIf try: from urllib.request import urlop...
8a3b6ec2f4138a54573574a14ef8348280e3ca958fb61b4a5bb11b246a0fe85e
Python
88,217
1,894
__author__ = 'Patrick B. Grinaway' import simtk.openmm as openmm import openmoltools import simtk.openmm.app as app import simtk.unit as unit import logging import numpy as np import parmed from collections import namedtuple, OrderedDict import copy from unittest import skipIf import pytest try: from urllib.reques...
6e4bc22095e8c2fab663faab392017f23cebe193380281937b8f1c04c741b437
Python
88,237
1,805
#!/usr/local/bin/env python # ============================================================================== # MODULE DOCSTRING # ============================================================================== """ MultistateSampler ================= Base multi-thermodynamic state multistate class COPYRIGHT Current ...
b3f1699bfa6943c6f7c2263c40809aff0a5fee760c85cda83b1aa2a6bac0da8f
Python
88,304
2,368
# 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...
d9f4948340d860d2478cb6bcadd43155e11bdb1d61f917c0fc1291266f8ac3a7
Python
88,478
2,014
"""API tests - upload -> analyze -> poll status -> results -> mesh export -> results bundle. landmarks are always manual now (see pipeline.py). using REFERENCE_TRIANGLE as landmarks on template_xy_com.ply since it's already in the frame the clip constants assume, so harmonize() has something real to work with without ...
b53db98fa1f57f9f898cf5e364373f25dbc2d6170d4c1ae6b62247c6fae4bc95
Python
88,515
1,794
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri May 28 2021 @author: Simon Pelletier """ import os import csv from PIL import Image import torch import itertools import numpy as np from torch.utils.data import Dataset import random import pandas as pd from sklearn.preprocessing import minmax_scale as...
e13a6e5cced46e630d57d5059e124b87987f0095b06d268caae27110efac6ce0
Python
90,231
2,922
"""=================== Annotation pipeline =================== The annotation pipeline imports various third party annotations or creates them for use in other pipelines. The purpose of this pipeline is to automate and standardize the way we retrieve and build genomic annotations but also to allow sharing of annotati...
f5cc3df9b337900b55354cb73e8be2ef66ed47a626bf0b9393d36c29e96acb45
Python
90,804
2,588
import math import os import sys import numpy as np from wfdb.io import download, _coreio, util MAX_I32 = 2147483647 MIN_I32 = -2147483648 # Formats in which all samples align with integer (power-of-two) boundaries ALIGNED_FMTS = ["8", "16", "32", "61", "80", "160"] # Formats in which not all samples align with in...
582b981972ccab4c07edf39f75285ff2d9788546e2a6b669ea1da93b45ca6322
Python
90,807
2,220
""" Hippocampus models. :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 term...
323e48901ebf1ecd2c1b197e8cc1d81298366b29ee89aa02ab729d725fbcfebc
Python
91,343
2,827
"""Run managers.""" from __future__ import annotations import asyncio import atexit import functools import inspect import logging from abc import ABC, abstractmethod from collections.abc import Callable, Mapping from concurrent.futures import ThreadPoolExecutor from contextlib import asynccontextmanager, contextmana...
9fa7efa74be16b08e812c80d09cc341075e31a30798af9b46bf8dc2ca5f4c315
Python
91,754
2,067
""" 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: ...
54dd03f22b406644c8d84357b0ffe4b60fe8e4f2707627eace3813d68622fddb
Python
91,786
1,580
#!/usr/bin/env python3 """Design guides for diagnostics.""" import argparse from collections import defaultdict import logging import os import random import re import shutil import sys import tempfile import numpy as np sys.path.append(os.getcwd()) from easyDesign import alignment from easyDesign import guide_search...
fba9bd0b28c876223a4f70e309c3860ad5e920736898461f9c53dabfeabbcaf3
Python
91,873
2,355
# network wrappers for 3D-RGAN # Created: 2021 # Updated: 3/21/2022 # Status: OK import torch import os, sys import glob import shutil import wandb import shap import torch.nn as nn import torch.optim as optim import numpy as np import pandas as pd import nibabel as nib import matplotlib.pyplot as plt import tabulate...
9a5879e85d82a7a2ac40959674b3d4fb8baef6b390f73d82532b80687bea71dc
Python
91,959
2,918
"""Module that contains tests for runnable.astream_events API.""" import asyncio import inspect import sys import uuid from collections.abc import AsyncIterator, Callable, Iterable, Iterator, Sequence from functools import partial from itertools import cycle from typing import ( Any, cast, ) import pytest fro...
d55d69d063518106ec7939d532d21c6aa75d4e685a3ed36a7f0f0df1b68a1035
Python
92,378
2,949
'''PipelinePeakCalling.py - Tasks associated with pipeline_peakcalling ====================================================================== One set of functions runs peak callers and uploads the called peaks into the database. The functions follow the following naming convention: runXXX() run a certain peak ca...
8f08cfac63097324e35371a2e6544485f2f2ece994e5b76432d8ab874bb291de
Python
92,602
1,365
import random import datetime as dt from tqdm import tqdm import numpy as np import os from typing import Dict, Union from lips.benchmark.airfransBenchmark import AirfRANSBenchmark from lips.dataset.airfransDataSet import AirfRANSDataSet from lips.dataset.scaler.standard_scaler_iterative import StandardScalerIterative...
649b478a5783f1247ec73e29e393f04a2626f032ec3b5e8e78d9932b15db6264
Python
92,949
2,942
'''peakcalling.py - Tasks associated with pipeline_peakcalling ====================================================================== One set of functions runs peak callers and uploads the called peaks into the database. The functions follow the following naming convention: runXXX() run a certain peak caller lo...
c18467aecd359a6a3bebefe1eb1e95af7244a642a966bafdcc9c7b83e97b67bd
Python
93,928
2,082
# -- coding: utf-8 -- # @Time : 2022/10/15 16:05 # @Author : Biao Zhang # @Email : littlebiao@outlook.com # @File : process.py import pickle import numpy as np import scanpy as sc, anndata as ad import scipy.sparse as sp import pandas as pd import sys import os sys.path.append('../code/') #from BrainAlign.code.utils ...
73107baca0136d95127fc6611293668206e153345230ddf37206b39aa81a86a2
Python
93,931
2,082
# -- coding: utf-8 -- # @Time : 2022/10/15 16:05 # @Author : Biao Zhang # @Email : littlebiao@outlook.com # @File : process.py import pickle import numpy as np import scanpy as sc, anndata as ad import scipy.sparse as sp import pandas as pd import sys import os sys.path.append('../code/') #from BrainAlign.code.utils ...
93bce5b54a8fab90b00c444e8d4cb99ed4ec3cc8efe8bf3204061b0743c652d4
Python
95,199
2,418
import math import numpy as np import networkx as nx from tqdm import tqdm from copy import deepcopy from scipy.sparse.linalg import eigsh import matplotlib.pyplot as plt from numpy.random import randn import random import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import ReLU from torch_...
f3f1e35ca275cc5337b7853747f8c9b922ac943aae929616273b76766341c1c1
Python
95,646
2,442
"""Module contains utility functions for working with messages. Some examples of what you can do with these functions include: * Convert messages to strings (serialization) * Convert messages from dicts to Message objects (deserialization) * Filter messages from a list of messages based on name, type or id etc. """ ...
1432c677917909932b4267d71fe0209a5460b210090027f35024a1a9002107f6
Python
96,106
2,544
''' functions for model ''' from neuron import h import pandas as pd import math as math import numpy as np import random import os from tqdm import tqdm import seaborn as sns import matplotlib as mpl import plotly.graph_objects as go def cell_build(cell_type='dspn', specs=None, addSpines=False, branc...
ce661437faddfa301e9487f9cd0fd3126a0290fbbf8f2862da7c6b6f73863dc9
Python
97,734
2,066
"""Methods for searching for optimal guides to use for a diagnostic. """ from collections import defaultdict import logging import math import random import numpy as np from easyDesign import alignment from easyDesign.utils import index_compress from easyDesign.utils import lsh from easyDesign.utils import predict_a...
88dc7165680b60c52a47c9664d48e4508afc1b8acd994f81230ae12d1e887cc3
Python
97,814
2,308
# 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 ...
374982900ea2a57eaa981452c233a763d81a9be7fe4026be55fe84726de134c5
Python
98,471
2,784
import os import re import collections import itertools import cgatcore.experiment as E from cgatcore import pipeline as P import cgatcore.iotools as iotools import cgat.BamTools.bamtools as BamTools import pandas as pd import pysam import numpy as np import shutil from cgatcore.pipeline import cluster_runnable from rp...
c390eb0e9894db7e383bb1b72ba3bcba43c189fa9a39c4a5930b231dbbed13c5
Python
99,220
2,443
""" Tests for Topology """ import itertools import re import tempfile from collections import defaultdict from copy import deepcopy from io import StringIO from pathlib import Path import numpy as np import openmm.app import openmm.unit import pytest from openff.units.openmm import from_openmm from openff.utilities ...
b1f12eeb1cd10772b8a3d0508b49006f91578859f05868cf6fb1f450a51320b2
Python
100,320
2,452
''' PipelineLncRNA.py - functions and classes for use with the lincRNA pipeline =========================================================================== ''' import re import sys import os import cgat.GTF as GTF import cgatcore.iotools as iotools import gzip import collections import cgat.IndexedGenome as IndexedGe...
b946f811e101bb710d876eb75a0403e48a5ab89afff8d906331aa1f146950f29
Python
101,044
2,557
""" Class definitions to represent a molecular system and its chemical components .. todo:: * Create MoleculeImage, ParticleImage, AtomImage here. (Or ``MoleculeInstance``?) * Create ``MoleculeGraph`` to represent fozen set of atom elements and bonds that can used as a key for compression * Add hierarchical ...
3ffdccdc39ff909f62f8158019a84cc055aefe354765a593287a824baa6b4a20
Python
102,072
2,521
import logging import os import pathlib import random import time from pathlib import Path from typing import Callable, List, Literal, Tuple, Union import humanize import torch import torch.nn as nn import torch.nn.functional as F import xxhash from torch.nn.modules.loss import _Loss from torch.utils.data import DataL...
e9d135c55015cb03501526ce3d8010f97e828a0196e20470af71af97f0ce1757
Python
103,743
1,991
#!/usr/local/bin/env python """ Test replicaexchange.py facility. TODO * Create a few simulation objects on simple systems (e.g. harmonic oscillators?) and run multiple tests on each object? """ # ============================================================================================= # GLOBAL IMPORTS # =====...
be31486406ca258f0e72f2118c476e94a7daaa07de1176ef4d88943bc426bf7d
Python
103,758
3,172
"""=========================== Variant annotation pipeline =========================== :Author: Andreas Heger :Release: $Id$ :Date: |today| :Tags: Python The Variants pipeline attempts to annotate variants in a :term:`vcf` formatted file. It computes 1. the effects of SNPs on transcripts and genes This pipeline ...
f4a525c2b7c0b5564da92393aed43e590977762aed75b5ae91000315e32bfba5
Python
104,585
2,187
# -*- coding: utf-8 -*- """ Created on Wed Oct 30 13:30:36 2016 Define poly(A) sites and calculate relative usages parallelized @author: schmiral """ __date__ = "Wed Oct 05 13:30:36 2016" __author__ = "Ralf Schmidt" __email__ = "ralf.schmidt@unibas.ch" __license__ = "GPL" # imports import sys import os import time ...
611a57da6aade621f7b794aa5587f32757e6f5cfef5a39987bd17587c6f1ee23
Python
104,922
2,878
#################################################################################### # # 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...
2e8627ac95a447c4d962ad04263643c8864ce18801b2c3d9b7963aa9571be124
Python
106,043
2,114
"""builds the results you get after an analysis - meshes, a json report, and a measurement figure, packaged as CP_{stem}_{C|F}_{3|4}[_CoM]/ (see results_folder_name). this is basically the same stuff the old app wrote next to your file (_rg.ply, _metrics.json etc), just organized into one folder now instead of a pile o...
60faf75450b38bbb73b322efc8ad68f9de5a74b5b75de000cb7d2b4cd496b756
Python
106,575
2,747
""" Wrapper class providing a minimal consistent interface to the `OpenEye Toolkit <https://docs.eyesopen.com/toolkits/python/quickstart-python/index.html>`_ """ __all__ = ("OpenEyeToolkitWrapper",) # See https://github.com/conda-forge/openff-toolkit-feedstock/issues/86 try: import zstandard # noqa except Impor...
1b1d9d5c774db696520e5e403957b89ad77e6a0a4b6df319385b8e07dda8bf86
Python
106,735
3,290
import collections import copy import datetime import functools import hashlib import heapq import io import logging import os import pathlib import platform import re import shutil import tempfile import types import unittest import unittest.mock import click import click.testing import depthcharge import depthcharge...
b38c17ca69c07072b5718ae985e37d14b24e02e08f78d5b56bc14390171c6e52
Python
107,247
2,587
""" Nonparametric survival estimators Author: George H. Chen (georgechen [at symbol] cmu.edu) This file contains the following classes and various helper functions (all of these implement both Kaplan-Meier and Nelson-Aalen versions): - BasicSurvival : basic Kaplan-Meier and Nelson-Aalen estimators that do not accou...
3880e4a9a74a3fa2dc38660edd6b8963e5d8467a001f27220082842f0a873daa
Python
108,728
3,172
import base64 import json import math import re from collections.abc import Callable, Sequence from typing import Any, TypedDict import pytest from typing_extensions import NotRequired, override from langchain_core.language_models.fake_chat_models import FakeChatModel from langchain_core.messages import ( AIMessa...
f02d8b614a7ea075a6b5a48a25c66e6d732f82fdbba732cdc490d99d8053ffa7
Python
109,012
2,362
import torch from torch import nn from torch.utils.data import TensorDataset import torch.nn.functional as F import numpy as np import math import copy from net_helpers import BaseNetwork from net_helpers import rand_weight_init, linear_fn from net_helpers import relu_fn, sigmoid, tanh_re, tukey_fn from net_helpers i...
a1cdba3cc76cd3ab6b8589cf5f6a480fa4b89bb789425ccbb4172066d2d135cc
Python
109,459
2,817
# A collection of tools to remotely access a CATMAID server via its API # # 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 ...
ab16a6628acbbf507864b84f3717483ec640c362d09ddbf75c4709d9db9627a3
Python
110,131
2,994
#################################################################################### # # 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...
6fbf725e51131d8a7890d09b72cc9ec4177524f4e7b4552a722fb4bce746a715
Python
111,446
2,941
import warnings from abc import ABC from typing import Optional, Sequence, Union import numpy as np import torch import torch.nn.functional as F from torch.nn.modules.utils import _pair from bindsnet.utils import im2col_indices from ..network.nodes import SRM0Nodes from ..network.topology import ( AbstractConnect...
13c20ad278e20a476e2cdd80cc40f64435e1f0732255263833cb01d375600097
Python
111,566
2,565
import copy import logging import traceback from collections import defaultdict from functools import lru_cache from pathlib import Path from typing import Any, Callable, Dict, List, Literal, Tuple, Union import dask.array as da import humanize from sklearn.preprocessing import LabelEncoder try: import napari exc...
a9c85a53e979f592420cfa094599dccd6a71184e83daf86d8bc0f3ba444314cc
Python
111,608
2,791
"""Chat models for conversational AI.""" from __future__ import annotations import asyncio import builtins # noqa: TC003 # runtime-evaluated; subclass `dict()` shadows the builtin import contextlib import json from abc import ABC, abstractmethod from collections.abc import AsyncIterator, Callable, Iterator, Sequenc...
a80a88f8cc1b055216abe802b66020654808efbe9081d77ab831e4f080386eaf
Python
115,169
2,221
#!/usr/bin/env python # ============================================================================= # MODULE DOCSTRING # ============================================================================= """ Test State classes in states.py. """ # ========================================================================...
fed2051098fbef257d496359605cccdee42e869f8e432239d3fb41c3fda335f2
Python
115,177
2,917
""" Test classes and function in module openff.toolkit.typing.engines.smirnoff.parameters. """ from collections import defaultdict from inspect import isabstract, isclass import numpy import pytest from numpy.testing import assert_almost_equal from packaging.version import Version from openff.toolkit import ForceFi...
349c8d6496904725014ab71b3c6000ddd9370a8c2c02c67b66f451c229aa481a
Python
115,672
3,489
'''mapping.py - Utility functions for mapping short reads ============================================================== Mapping reads is a common task in pipelines. Different pipelines combine different sources of input (:term:`fastq` files, :term:`sra` files) of different data (single end, paired end) with differen...
b9f1525810fb62940e2b17d601c48c4864fdc8d24dd83197feeac199f2559bde
Python
116,268
2,553
#!/usr/local/bin/env python # ============================================================================== # MODULE DOCSTRING # ============================================================================== """ MultiStateAnalyzers =================== Analysis tools and module for MultiStateSampler simulations. Pro...
ad63e84a3bca1d669ae2dfb29a19f0884ba79f4e51a15d58a43e9df6c04a9536
Python
117,776
2,364
from __future__ import print_function """ Test systems for perses automated design. Examples -------- Alanine dipeptide in various environments (vacuum, implicit, explicit): >>> from perses.tests.testsystems import AlaninDipeptideSAMS >>> testsystem = AlanineDipeptideTestSystem() >>> system_generator = testsystem.sy...
31978d8febe336243c4aa846f424567c1adcd1be1a34702e41fb94be08ad3f8f
Python
117,794
2,364
from __future__ import print_function """ Test systems for perses automated design. Examples -------- Alanine dipeptide in various environments (vacuum, implicit, explicit): >>> from perses.tests.testsystems import AlaninDipeptideSAMS >>> testsystem = AlanineDipeptideTestSystem() >>> system_generator = testsystem.sy...
f53b7e9cf7eee3f407cfd328cb8d57a0fd80edbf692a4cb99119db08b9398e6e
Python
120,058
1,665
from math import sin, cos, radians from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakePrism, BRepPrimAPI_MakeRevol from OCC.Core.BRepAlgoAPI import BRepAlgoAPI_Cut, BRepAlgoAPI_Fuse, BRepAlgoAPI_Common from OCC.Display.SimpleGui import init_display from OCC.Core.gp import gp_Pnt, gp_Ax1, gp_Ax2, gp_Dir, gp_Circ, gp_Vec f...
e7ed4005210716ed3337f5d71bbaaab42b77223c61410d333753b42576d0051a
Python
121,598
4,401
"""=========================== Pipeline GWAS =========================== .. Replace the documentation below with your own description of the pipeline's purpose Overview ======== This pipeline computes the word frequencies in the configuration files :file:``pipeline.yml` and :file:`conf.py`. Usage ===== See :re...
626c932c83ff513dc3ee1709b57ec5723ecb30c81639097d1edfb1ebeea2ab08
Python
121,844
2,651
import logging import os import shutil import tempfile import warnings from collections import OrderedDict from pathlib import Path from typing import Callable, List, Literal, Tuple, Union import czifile import dask import dask.array as da import dask_image.imread import h5py import numpy as np import pandas as pd imp...
26db33928b146e5856323625325a757935cd0c1cd21019ac522e36eb14135256
Python
122,491
3,037
#################################################################################### # # 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...
a0a2708647dfea2cde7e9e8263c906eafcf78385221deb8c1a55e737595b7766
Python
122,889
2,336
#!/usr/bin/python # ============================================================================= # MODULE DOCSTRING # ============================================================================= """ Tests for alchemical factory in `alchemy.py`. """ # ==============================================================...
df67b768ee9c506b0fe50aa2ece4f8457a2eea3ba312eb26388dec4087ba33ed
Python
124,106
2,657
import matplotlib from tqdm import trange from bernn.utils.pool_metrics import log_pool_metrics import pandas as pd import numpy as np import random import torch from torch import nn from torch import nn from sklearn import metrics import contextlib import copy from bernn.utils.ax_compat import optimize, AX_AVAILABLE ...
69ddc5905ed0d2a4b4ebe82861266a50dfef94e3e3a42750484e00e6a2fc4669
Python
125,684
2,533
""" This file contains the base classes for topology proposals """ from simtk.openmm import app import copy import logging import itertools import os import numpy as np import networkx as nx import openmoltools.forcefield_generators as forcefield_generators from perses.storage import NetCDFStorageView from perses.rjm...
8782006323c4ec8e7dd5d9d41b2e1e2cfdcde72cdc1421cf39482a9e24d90fc9
Python
126,373
3,327
# Copyright 2024 DeepMind Technologies Limited # # AlphaFold 3 source code is 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...
6f35c8c8eb8ed9d840144ee3ccc49931f6a6b65497d00a87a0187be987faf6b0
Python
126,540
3,124
""" A modified version of the original Scholar implementation by Dallas Card to support survival analysis supervision (Cox and several parametric AFT losses), and where we explicitly support two underlying topic models (LDA and SAGE) The original Scholar code that this file is modified from can be found at: https...
9e8b6135a4d75492b7316d28a16dc16fb53dbac45c01003f3bc0735aa9c1fc4b
Python
127,457
2,565
""" This file contains the base classes for topology proposals """ from simtk.openmm import app import copy import logging import itertools import os import numpy as np import networkx as nx import openmoltools.forcefield_generators as forcefield_generators from perses.storage import NetCDFStorageView from perses.rjm...
6ba573bd3caef5e3f8c6dbfa626fb89ae2ea02665d20306a2d8701c873f4d50e
Python
129,267
2,829
import torch from torch import nn from torch.utils.data import TensorDataset import torch.nn.functional as F import numpy as np import math import copy from net_helpers import BaseNetwork from net_helpers import rand_weight_init, linear_fn from net_helpers import relu_fn, sigmoid, tanh_re, tukey_fn from net_helpers i...
661e005c652038faad40868c4197b27e4fd8613d7afc632dc3a6151d412eb619
Python
131,108
2,160
from __future__ import absolute_import from perses.dispersed import feptasks from perses.utils.openeye import createOEMolFromSDF, createSystemFromSMILES, extractPositionsFromOEMol, generate_unique_atom_names from perses.utils.data import load_smi from perses.annihilation.lambda_protocol import RelativeAlchemicalState,...
ccb0807c8b42aceb1d8f025ce64b5f25ede4d161a591c870f4475b63ecf6979c
Python
131,748
2,545
#!/usr/bin/python # ============================================================================= # MODULE DOCSTRING # ============================================================================= """ Alchemical factory for free energy calculations that operates directly on OpenMM System objects. DESCRIPTION This m...
80a3a183251dc183541b61a0eac49c8829ad21434805618d15c16adb5ddef28b
Python
135,032
2,239
from __future__ import absolute_import from perses.dispersed import feptasks from perses.utils.openeye import createOEMolFromSDF, createSystemFromSMILES, extractPositionsFromOEMol, generate_unique_atom_names from perses.utils.data import load_smi from perses.annihilation.lambda_protocol import RelativeAlchemicalState,...
7bf59ad0894fff4f7401ac79d64ab584c1c88b79015ef7af4db99f0afc6ccf84
Python
136,581
3,287
# mypy: ignore-errors """ Wrapper class providing a minimal consistent interface to the `RDKit <http://www.rdkit.org/>`. """ __all__ = ("RDKitToolkitWrapper",) import copy import functools import importlib import itertools import logging import pathlib import tempfile import warnings from collections import defaultdi...
41e33207e41c7f3e3df21544b456e323a67c293397e82ec4c95e785668f7f6b5
Python
142,120
2,705
""" This contains the base class for the geometry engine, which proposes new positions for each additional atom that must be added. """ from simtk import unit import numpy as np import networkx as nx from perses.storage import NetCDFStorageView ########################################################################...
f91e5bd1ccae798f05b6f233ee917a5c87eafb624700dcc15d717d59c47912bc
Python
142,443
2,708
""" This contains the base class for the geometry engine, which proposes new positions for each additional atom that must be added. """ from simtk import unit import numpy as np import networkx as nx from perses.storage import NetCDFStorageView ########################################################################...
64b6c5df2bcc8600b648982bf18218acee1e8877fa6f906b17776e624cabde3d
Python
143,636
2,674
# -*- coding: utf-8 -*- """ Created on Sun Aug 9 22:18:39 2020 @author: Shencong Ni """ import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.stats import sem import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.animation as animation import connec...
d219a7e773b8924d0cefc1a82bdba8662a22cfa2648c7d170473b680ad562afa
Python
148,178
3,768
""" Parameter handlers for the SMIRNOFF force field engine This file contains standard parameter handlers for the SMIRNOFF force field engine. These classes implement the object model for self-contained parameter assignment. New pluggable handlers can be created by creating subclasses of :class:`ParameterHandler`. ""...
0a21aa0aa7a34546369ef3830252cab0d65334d18830079a3bdd774edde19f53
Python
148,666
4,290
''' Expression.py - wrap various differential expression tools =========================================================== :Tags: Python Purpose ------- This module provides tools for differential expression analysis for a variety of methods. Methods implemented are: DESeq EdgeR ttest The aim of this mod...
6449d7ad39d3d5906d78422fa7a204e26f95e802d3794466707e2cee42d697ac
Python
149,120
3,569
#################################################################################### # # 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...
18a0d8474908b28ccd2940f35efbb04e43dfd9d4df93c0a1ad2f65777a165ece
Python
150,470
4,879
"""Test the base tool implementation.""" import inspect import json import logging import pickle import sys import textwrap import threading import warnings from collections.abc import Callable from dataclasses import dataclass from datetime import datetime from enum import Enum from functools import partial from typi...
01cf7c04c5a83d9ddf74d56ad5b2a62fad1ed7e8da0b9808dc250ee6951ba2bd
Python
153,832
3,217
# -- coding: utf-8 -- # @Time : 2022/10/17 14:28 # @Author : Biao Zhang # @Email : littlebiao@outlook.com # @File : analysis.py import pickle import numpy as np import scanpy as sc, anndata as ad import scipy.sparse as sp import pandas as pd import sys import matplotlib.pyplot as plt import re, seaborn as sns from coll...