sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
c8990a4706691fd5aad261b4d75957642610cb30d577fcb424d7f0ab72042f09
Python
15,607
435
#################################################################################### # # 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...
baa4bddef3b806b8993716df896e1956e8bd07905c4371e53ac88c5102eab5b8
Python
15,610
513
""" Utility functions for simulations using openeye toolkits """ __author__ = 'John D. Chodera' from simtk import unit from simtk.openmm import app import simtk.unit as unit import numpy as np import logging _logger = logging.getLogger("utils.openeye") _logger.setLevel(logging.INFO) def system_generator_wrapper(...
fd2b2cbf1b48c3de6d05ebe50af2fb36af3a8845ca1083656857027fb271505c
Python
15,616
398
"""EMBanded model.""" import copy from typing import List, Tuple import numpy as np from .helpers import ( check_positive_float, check_input, check_boolean, check_smooth_params ) from ._numpy_model_utils import ( prepare_smoothness_cov, create_matrix_indexer, fit_model_multidimensional, fit_model_vectoriz...
1a818a67edcaabd602a3fc443a2809a81c7ec967a6120bf42d7b44fb2ba02611
Python
15,619
282
from langchain_core.output_parsers.list import CommaSeparatedListOutputParser from langchain_core.prompts.prompt import PromptTemplate PROMPT_SUFFIX = """Only use the following tables: {table_info} Question: {input}""" _DEFAULT_TEMPLATE = """Given an input question, first create a syntactically correct {dialect} que...
b27acc18a575b01918367654347da3b3d3f73c376040a42b3aa996f3622bb05b
Python
15,628
493
import copy from typing import Dict, Tuple, Sequence, Union, Optional import numpy as np from tqdm import tqdm from cloudfiles import CloudFiles, compression from cloudvolume import lib, exceptions from ....types import CompressType, MipType from ....lib import Bbox, Vec, sip, first, BboxLikeType, toiter, xyzrange f...
662c680997192d50f680854eb01a080afe28b36e711a7f31ffe436e2675a7c1c
Python
15,640
391
# Copyright (c) MONAI Consortium # 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 in writing, so...
bc65b9d28c0ac0da5de7965a348828c59534af3f75f4b42a16d25edfc754891c
Python
15,648
405
import numpy as np import torch from torch_scatter import scatter def abs_cap(val, max_abs_val=1): """ Returns the value with its absolute value capped at max_abs_val. Particularly useful in passing values to trignometric functions where numerical errors may result in an argument > 1 being passed in. ...
3fb5d8d71e3adbfde2084ead9815c391cecbeca52f761a892ea959379a433c02
Python
15,649
446
"""Test loading functionality.""" import json import os from collections.abc import Iterator from contextlib import contextmanager from pathlib import Path from typing import Any import pytest from typing_extensions import override from langchain_core._api import suppress_langchain_deprecation_warning from langchain...
9e29254cdb7053f0a5b3635d312c2a152914e0cdc32c3e4b7eb00b30327c6e32
Python
15,653
347
#!/usr/bin/env python3 # pylint: disable=line-too-long ''' Check for blocks of enriched genes that co-occur within the genome, using intergenic distance boundaries and strand/order information from GFF. ''' import logging from collections import Counter from itertools import chain from enrichm.toolbox import reverse_di...
72b1d9a4f791e3178631ec742c00b3366b1f2be48da0eef555e3e6f9e5a98964
Python
15,691
508
"""Test the LangSmith evaluation helpers.""" import uuid from collections.abc import Iterator from datetime import datetime, timezone from typing import Any from unittest import mock import pytest from freezegun import freeze_time from langsmith.client import Client from langsmith.schemas import Dataset, Example fro...
6a489adab927b2fc829b6ac2e8aecab3999d6c45ccadb6af8818a176822575f9
Python
15,713
378
# -*- coding: utf-8 -*- """script_linearnetwork_diffbottleneck.ipynb Automatically generated by Colab. Original file is located at https://colab.research.google.com/drive/15ek-TkpNbt_UcgvOihWCPfIPUttm3K8s #Simulation for knockout training: **Two-layer linear network, different bottleneck** Please see "script_li...
c42f0c9243753cd58f7ca70d4190ec537683b6050718ace32c42ec249b45a99b
Python
15,716
440
#################################################################################### # # 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...
74294043c0e1bfa477a024c72e2e29751ba30241a6e96e66fdbfff51612ced55
Python
15,718
404
import torch import numpy as np import torch_geometric from EGNN_SE3 import EGNN as EGNNSE3 import torch.nn.functional as F import torch.nn as nn from utils import build_edge_idx from torch_geometric.utils import from_networkx, unbatch_edge_index import networkx as nx from torch_geometric.data import Data, Batch from t...
329f4b0b303c8bc4727fe2dde954f85c36271d521b9b703131d69b14c1de2fab
Python
15,739
467
import nibabel as nib import numpy as np from himalaya.ridge import GroupRidgeCV import sys from sklearn.model_selection import KFold from scipy.stats import pearsonr from scipy.stats import zscore from sklearn.model_selection import TimeSeriesSplit from sklearn.model_selection import train_test_split from sklear...
b6ca63061d5f8277de199bcc5df759923164f141d0192ccf6fdd92a385c9688c
Python
15,747
546
"""In-memory vector store.""" from __future__ import annotations import json import uuid from pathlib import Path from typing import ( TYPE_CHECKING, Any, ) from typing_extensions import override from langchain_core.documents import Document from langchain_core.load import dumpd, load from langchain_core.ve...
74590175ef1042dd8bd97f5c88a988b3818ef1e450eefd8f0ec67d7c6324fd2f
Python
15,770
473
"""Types for setting agent response formats.""" from __future__ import annotations import json import uuid from dataclasses import dataclass, is_dataclass from types import UnionType from typing import ( TYPE_CHECKING, Any, Generic, Literal, TypeVar, Union, cast, get_args, get_orig...
822ba1f0cc9d2500a4662f65a300a4779fcc2c1cee4ae356e001d9aa120ea526
Python
15,775
457
"""Runnable that selects which branch to run based on a condition.""" from collections.abc import ( AsyncIterator, Awaitable, Callable, Iterator, Mapping, Sequence, ) from typing import ( Any, cast, ) from pydantic import ConfigDict from typing_extensions import override from langchai...
e392685779df7a905cf6e40f56d8c2ebf8a0b13c1b0f32987b9bcb87c17f993c
Python
15,782
492
import os from contextlib import nullcontext import torch import torch.distributed as dist from torch import nn from torch.nn.parallel import DistributedDataParallel as DDP from torch.optim import Adam from torch.optim.lr_scheduler import CyclicLR, CosineAnnealingLR, ReduceLROnPlateau from torch_scatter import scatter...
38780dbbe3d7650bb2c3e6a7c70b0718510e9d4caeaee07e634c5780ef9b9b75
Python
15,788
371
#!/usr/bin/env python # Usage: python3.8 ingestion.py input_dir output_dir ingestion_program_dir submission_program_dir # =========================== BEGIN OPTIONS ============================== # Verbose mode: ############## # Recommended to keep verbose = True: shows various progression messages verbose = True # ou...
e8aebe100f5f3d13567b1406fbe287d6ef78b2bba6ade7b4a27dd608180635c0
Python
15,806
488
"""The command line entry point for Casanovo.""" import datetime import functools import logging import os import re import shutil import sys import warnings from pathlib import Path from typing import Optional, Tuple warnings.formatwarning = lambda message, category, *args, **kwargs: ( f"{category.__name__}: {mes...
e238f3f0051a2e2d40749b3b6bea27f486c0d37663ecbcc1f5297aa1959cf453
Python
15,820
414
# Copyright 2023 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
cccd6cbe29df7afb28f568ca6daa8ae8eeee4523d3af386aa7c18a29ad5520fe
Python
15,821
404
import numpy as np import nltk import csv, os, re import h5py, json, pickle import pkg_resources from symspellpy import SymSpell, Verbosity import inflect from sklearn.metrics.pairwise import cosine_similarity as cos_sim np.random.seed() # randomly initialize the seed sym_spell = SymSpell(max_dictionary_edit_distance...
630df0553c257e5fa933180de948c0e6b75404c88050829a9b6fc81329a7d082
Python
15,827
430
"""Tests for secret injection prevention in serialization. Verify that user-provided data containing secret-like structures cannot be used to extract environment variables during deserialization. """ import json import os import re from typing import Any from unittest import mock import pytest from pydantic import B...
82b564440d615863de4d636e771ad452634931485e44c82bb996817b0552319e
Python
15,842
321
#################################################################################### # # 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...
a5258ececf75d047e40ed47ec1ee5ee971e492ad7312aa6e91e5a9c02fb42f4c
Python
15,850
437
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import random from typing import Callable, Optional, Sequence, Union import numpy as np import torch # import torchdata.datapipes as dp import pdearena.data.utils as datautils from pdearena.data.utils import PDEDataConfig def build_...
2c541b5de18fa647e02304e6b13685dea125e090c5e756d829ee0df837e7ea98
Python
15,855
452
import torch import numpy as np import os import glob import random import matplotlib import imageio matplotlib.use('Agg') import matplotlib.pyplot as plt from qm9 import bond_analyze ############## ### Files #### ###########--> def save_xyz_file(path, one_hot, charges, positions, dataset_info, id_from=0, name='mol...
34cb0d3031b570ce66ea7c039d38df09717c7c3434c824fbde0d957c178cfba0
Python
15,877
321
#################################################################################### # # 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...
e949ea35e2c2899e8af000875404b618707caaea6294d29d9487a79761ad441a
Python
15,886
492
from copy import deepcopy from typing import Any import pytest from langchain_core.messages import AIMessage, AIMessageChunk, HumanMessage from langchain_core.messages import content as types def test_convert_to_v1_from_bedrock_converse() -> None: message = AIMessage( [ { "ty...
d24eb90b48d1bc3138b7847c8b7dd01793e83568b1ea8e2ea1c49a5ca6ce7cff
Python
15,898
335
import os import argparse import torch from tqdm import tqdm # import matplotlib.pyplot as plt import numpy as np from torch.utils.data import DataLoader # from plot_utils import Dipole, Efield import math import importlib import yaml import torch_scatter from orbevo.eval_utils import tfn_to_abacus_mol, normalize_d...
9d13af1712f19c0f1eb49f2effbe284083b2a9b3b3d6996484dc18c49a0898fa
Python
15,908
474
"""Base classes for comparing the output of two models.""" from __future__ import annotations import logging import re from typing import Any from langchain_core.callbacks import Callbacks from langchain_core.language_models import BaseLanguageModel from langchain_core.output_parsers import BaseOutputParser from lan...
cfd6eb2be21b8d5ec3c1b31f739a66e0156afffb153a7e5f43cadfab2eef761e
Python
15,921
382
from typing import List, Tuple, Union from itertools import zip_longest from rdkit import Chem import torch import numpy as np from HMSA.rdkit import make_mol MAX_ATOMIC_NUM = 100 ATOM_FEATURES = { 'atomic_num': list(range(MAX_ATOMIC_NUM)), 'degree': [0, 1, 2, 3, 4, 5], 'formal_charge': [-1, -2, 1, 2, 0], ...
2098ea86879b0905eeae34fcc6bb456cc7ee5936e2a2deaf4f5da2bcbcf4486d
Python
15,928
468
import logging import os import socket import sys from fcest.helpers.data import to_3d_format import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy import seaborn as sns from configs.configs import get_config_dict from helpers.figures import set_size from helpers.plotters import convert_...
ecf4ac2456fa785ea65014ef22226d044623e0aa93e381910ff386020817a5b8
Python
16,005
197
"""Protocol P5: laboratory to field (Changan EVs), vehicle-disjoint, on top of corpus B. Stages point F1 random labels within the field fleet (leaky reference, 20 % test) -> results/<tag>_point.csv F3 vehicle-disjoint 5-fold within the field fleet P5 train on the twelve laboratory...
0a90815a3cc42ade6764bbf6b8d9936558bc57bf95d16d38881338c4501100e1
Python
16,009
299
""" This script contains the classess of the layers that we have implemented for our model """ import tensorflow as tf class AttGraphConvLayer(tf.keras.layers.Layer): def __init__(self, outDim,activation=None,alphaLReLU=0.2,dropAtt=None, **kwargs): # constructor, which just calls super constructor ...
b3fa844e1f8c36f68bbd24f6cd2a2ce14e6ef68ca9bf6b77edb011130fe2aceb
Python
16,020
582
"""PipelineGO - Tasks for a GO analysis ============================================ Reference --------- """ import re import glob import os import collections import sqlite3 import cgat.Experiment as E import cgatPipelines.Pipeline as P import cgat.Stats as Stats import cgat.iotools as iotools import cgat.csv as C...
f1d225684bb1c98ccc47770495f1c21cdfe19898fce1d9fcd07e4dc23d90fe82
Python
16,021
320
"""cutting the mesh down to just the cranium or just the face. ported the geometry from gui_methods.py's cranial_cut/facial_clip (old repo), swapping pyvista's .clip()/.clip_surface() for trimesh's slice_mesh_plane. works on an already-registered mesh (see registration.rigid.landmark_align) - the plane/sphere numbers ...
8fb1dc744e0c17d066ac2143101da4ace23dccb30077b2fa98cc525cb6a438b2
Python
16,042
383
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import pdb import torch from torch import nn from functools import partial from .activations import ACTIVATION_REGISTRY import numpy as np from torchdiffeq import odeint # faster but more memory # from torchdiffeq import odeint_adjoint as odeint...
1aca28f16b00237c61c0f64feb140bd914b1fb5f748ecbe9d697fe30de37b173
Python
16,050
451
from collections import namedtuple import json from pycromanager.acquisition.acq_eng_py.main.acq_eng_metadata import AcqEngMetadata class AcquisitionEvent: class SpecialFlag: ACQUISITION_FINISHED = "AcqusitionFinished" ACQUISITION_SEQUENCE_END = "AcqusitionSequenceEnd" def __init__(self, acq, ...
389ecec8d685469ee8574ab4a7ac0280d5a97e5453453fe9bd5df093b914fb93
Python
16,071
407
""" cluster_session.py SSH connection and cluster capability detection for the BrainCell deployment panel. Decoupled from the GUI so it can be tested on its own. Responsibilities: * Connect to a remote machine over SSH (password or key-file auth). * Detect what's available there: Docker? Singularity? Neither?...
9c9397b5febd7eeb5fefe7261d49eda7244b0999db0e7a6ea3cfdc3b6dbdd1c9
Python
16,088
462
########################### # Latent ODEs for Irregularly-Sampled Time Series # Author: Yulia Rubanova ########################### import matplotlib # matplotlib.use('TkAgg') matplotlib.use('Agg') import matplotlib.pyplot import matplotlib.pyplot as plt from matplotlib.lines import Line2D import os from scipy.stats i...
c8b43156574faa0cf6c5788d893759c712dac618382326a7b335c783bc40f223
Python
16,092
351
from typing import Any, Tuple, List import os from os.path import join from pathlib import Path from sys import stderr import time from torch.utils.data import DataLoader from torch import nn import torch from pprint import pprint import warnings warnings.filterwarnings("ignore") import pytorch_lightning as pl warnin...
af0e1d2ddf6412b9134708e1072845c6c7e85fbe673a709f9b06d6fe824f465c
Python
16,100
336
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # 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 without limitation # the rights to...
2ddfa589a9788b0272aeb44cd5e819976445140d0e1d823dbfdfa2290a79be3f
Python
16,119
503
from pathlib import Path from time import time import argparse import shutil import random import matplotlib.pyplot as plt import seaborn as sns from tqdm import tqdm import numpy as np from Bio.PDB import PDBParser from Bio.PDB.Polypeptide import three_to_one, is_aa from rdkit import Chem from scipy.ndimage import ...
e428c5a5ec964a638a4c5b266516ac2284edd402d8e1e17a63ad55c71c55096c
Python
16,122
290
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany # # 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://w...
f586ddd8f7945399937be4bdac8bb9448f3d38bf949cc29cf4368a3321a9798c
Python
16,124
480
""" Copyright (c) Meta, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. --- MIT License Copyright (c) 2021 www.compscience.org Permission is hereby granted, free of charge, to any person obtaining a copy of this softwa...
8f0806b2a030b392496901e5f9af388f20abfa4b64ce7ace50baadbb68302de1
Python
16,127
414
import torch import torch.nn as nn from torch.nn import functional as F import numpy as np def adjust_spines(ax, spines): """ axis spine use it like: adjust_spines(ax, ['left', 'bottom']) """ for loc, spine in ax.spines.items(): if loc in spines: spine.set_position...
fb2aa66b25d4f0cc11ada7f9ee351c52cf937c6a6796a6f6dd5fa6e9a05082ec
Python
16,127
404
# -*- coding: utf-8 -*- """script_linearnetwork_samebottleneck.ipynb Automatically generated by Colab. Original file is located at https://colab.research.google.com/drive/156AuJeYr-300s3wEpTG_6Nv_P7l2hskC #Simulation for knockout training: **Two-layer linear network, same bottleneck** Idea: Treat a ground trut...
cb44b684eb837bd1f3c9c552c98643ec0a5376b2881b340f0a41d2ef2497d25b
Python
16,132
441
# Copyright (c) MONAI Consortium # 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 in writing, so...
7b90c968bc565d9dae224e14d6f3206d0333d4598113e4b6459beb52c051d2a7
Python
16,133
422
import argparse import logging import os import re import random import shutil import sys import time from xml.etree.ElementInclude import default_loader import numpy as np import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.d...
30da4bef2b0c3305559bb25e4b639e79c9a4ec4e06fea5505b4a703f04262a4b
Python
16,156
307
import numpy as np import networkx as nx import torch as pt import pytorch_lightning as ptl import torch_geometric as ptg import torch from torch.nn import Sequential as Seq, Linear, ReLU from torch_geometric.nn import MessagePassing from pytorch_lightning import LightningModule from torch.optim.adam import Adam from t...
8f1a127a36b68b615d721dca13fd38e8157f615ae68cd987f702eec6874795d1
Python
16,159
483
"""Prompt template that contains few shot examples.""" from __future__ import annotations from typing import TYPE_CHECKING, Any, Literal from pydantic import ( BaseModel, ConfigDict, Field, model_validator, ) from typing_extensions import override from langchain_core._api import deprecated from lang...
7e2fa141668a8b2d44b96b08e41afa0cbd91707884e54564186b5ac54c3e3226
Python
16,161
596
############################################################################# # #Updated by: Yiqin Wang # ############################################################################## import os import re from FileIO import FileIO #from collections import defaultdict def flip(x): #return a reverve complementary stri...
763febd7795cc7f546988e31f9b35434713745d646e8b466d08cf8f9905f3ce1
Python
16,189
318
import copy import torch import os from tqdm import tqdm import numpy as np from CEL.utils.register import register import torch.nn as nn import optax import equinox as eqx import jax from CEL.data.data_manager import MyDataLoader from CEL.networks.models.meta_model import ModelClass import pathlib from munch import M...
d1b6db85618d104eb6694e4b3d3f9507b02092ac6507281de8323b4ca2cd42a2
Python
16,191
521
"""Generic utility functions.""" import contextlib import datetime as dt import functools import importlib import os import warnings from collections.abc import Callable, Iterator, Sequence from importlib.metadata import version from typing import Any, overload from uuid import uuid4 from packaging.version import par...
8be20f55249b6babc19931067425c3816c008881eaf49f4cf8bcd5ab1fdf7af8
Python
16,194
293
#!/usr/bin/env python # ============================================================================= # MODULE DOCSTRING # ============================================================================= """ Test Force classes in forces.py. """ # ========================================================================...
dba13f16d831d48d1b9bb1b427207d0603a48c8687273d68ee7b599fe57afec9
Python
16,196
183
import numpy as np from rdkit import Chem import torch # ------------------------------------------------------------------------------ # Computational # ------------------------------------------------------------------------------ FLOAT_TYPE = torch.float32 INT_TYPE = torch.int64 # --------------------------------...
91ca1dd1a32d396a88f008fd6e192946cbfe3824e4704e6e642fb8ec297f89df
Python
16,198
460
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed deterministic solver 'wmrk4' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # This model combines all we...
ed974c6e47d12fc223fa51d1e19d56b90beff9dbb8691a1cbbfca645002c9a50
Python
16,199
467
from ChipseqReport import * class FoldChangeTracker(TrackerSQL): '''the fold change tracker ignores unstimulated tracks.''' def __init__(self, *args, **kwargs): TrackerSQL.__init__(self, *args, backend=DATABASE, **kwargs) def getTracks(self, subset=None): tracks = TrackerSQL.getTracks(s...
ff6ce2bda83fe13650c5c121005bae48c36ab0e1cbad23884aed6e2e3b2379da
Python
16,215
460
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed deterministic solver 'wmrk4' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # This model combines all we...
b063b1d4cbc54b5c003a1176334d1e862a35512532057ac156f081416720475d
Python
16,228
413
import pandas as pd import numpy as np import json import os import torch import rpy2.robjects as robjects import rpy2.robjects as ro import rpy2.robjects.numpy2ri from rpy2.robjects import pandas2ri from rpy2.robjects.packages import importr from rpy2.robjects.conversion import localconverter from rpy2.rinterface impo...
395fab03284aa69795de86a1c62af58b401c6085fca9328df176a35bf65fb3c6
Python
16,230
415
# image processing import os from typing import Union import cv2 as cv import numpy as np import tifffile as tf from matplotlib import pyplot as plt, patches from skimage import io as skio # simple ZProfile function for any sized square in the frame (equivalent to ZProfile function in Fiji) def ZProfile(stack: Union...
7ebf4b8a3761e395c41f5f04b0664ba2251e3b4fd77b6b6adacdbcf2aa417137
Python
16,245
348
# -*- coding: utf-8 -*- # @title Generate configuration files for SNN HH # @file gen_config.py # @author Romain Beaubois # @date 23 Oct 2023 # @copyright # SPDX-FileCopyrightText: © 2023 Romain Beaubois <refbeaubois@yahoo.com> # SPDX-License-Identifier: GPL-3.0-or-later # # @brief Script to generat...
af60098250f4a9d3ec1bdac0589646ea57ffe1a115901f16a776adb36cf9fbbb
Python
16,260
467
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed stochastic solver 'Tetexact' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # This model combines all we...
9781b13fbfeb003ff82a8904fafc8cfce7cafc61afc5225c641599afc99331c7
Python
16,267
451
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed stochastic solver 'TetVesicle' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # Note, while these are well-mi...
7cc4fe3710f5444841e878621d6b69ae8923f9b1e291df72e0e4f699cea2b4ee
Python
16,272
558
# 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 ...
8553cb6b5a4ed2a44ce8f88ac5bad92c9045baeca4792c316692e33b65ad3fd9
Python
16,272
449
# 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...
3238aefcca1948304f9dafb244ad2185c8e0a695255942566cf9f179a4cc357d
Python
16,277
467
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed stochastic solver 'Tetexact' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # This model combines all we...
0966bb7625423a1fa44154ea7e63972d1bcc8359152a74faaebf3e6764d304cb
Python
16,282
333
#!/usr/bin/env python3 # coding: utf-8 """ Run ABCD Task Prep Level 1 analysis for pipeline_wrapper.py Greg Conan: gconan@umn.edu Created: 2021-01-15 Updated: 2021-12-03 """ # Import standard libraries from glob import glob import os import shutil import subprocess import sys def find_local_imports(flg): """ ...
973e3ab715ee8e82209c1543cf17682823a9c33629c9e0b0bb23387f5ec0fcc8
Python
16,282
185
# code adapted from https://github.com/arneschneuing/DiffSBDD/blob/main/constants.py import numpy as np from rdkit import Chem import torch # ------------------------------------------------------------------------------ # Computational # ------------------------------------------------------------------------------ ...
7392508bad73e285899b8b1e34e882031773a7ee9ec8cea9c75b3324be522cdf
Python
16,284
451
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed stochastic solver 'TetVesicle' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # Note, while these are well-mi...
039d624d1eab72aa384c3f09095e61e766252fe3c91f7fbdd215b2518dd96ad5
Python
16,321
416
from typing import Union import numpy as np import pandas as pd from mne import EvokedArray from scipy.linalg import eigh, pinv from sklearn.base import BaseEstimator, TransformerMixin def _shrink(cov, alpha): n = len(cov) shrink_cov = (1 - alpha) * cov + alpha * np.trace(cov) * np.eye(n) / n return shrin...
d5f4b5bd4fba1b43862b24648a05c52ba6d1f0e7d1ff197f6ca5ee184a7d7ae5
Python
16,325
393
import albumentations as A from albumentations.pytorch import ToTensorV2 from joblib import Parallel, delayed from torch.utils.data import DataLoader from modulable_CNN3D import CNN3D import os import torch from torch import nn import numpy as np from skimage.io import imread, imsave from src.napari_svetlana.CustomDa...
7bc73df9b57ba90eaafecfd4dc391509b25fc2984032d204fd363421ac9dabaf
Python
16,342
374
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this sof...
55c87336d9d6414ff4e325d46f23282544fc66ca787b60ca350dd75e1d05e74d
Python
16,354
384
import torch import os, json import os.path as osp from itertools import repeat import numpy as np from rdkit import Chem from torch_geometric.data import InMemoryDataset, Data from tqdm import tqdm import msgpack import pickle dict_drug = {1:'H', 5:'B', 6:'C', 7:'N', 8:'O', 9:'F', 13:'Al', 14:'Si', 15:'P', 16:'S', 17...
d8da508d0804d446d573d17057ed94f14ccc61937debb247fb4f5426a258ad8c
Python
16,354
468
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed stochastic solver 'TetVesicle' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # This model combines all ...
651dcc6b437928bf3ddd33b26ed2b301673004999c445acaea134a0a717b4840
Python
16,376
477
# Copyright 2023 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
3daf9aba90f69ee88c09e9f45d327c0cb1dee8352c07f67232b25d2c7467fa6c
Python
16,386
469
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed stochastic solver 'TetOpSplit' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # This model combines all ...
c0fa71208b4c0d20be032d7b15da2229501bbb3ff49a3ffa0e02dc0f3fc542bf
Python
16,392
389
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this sof...
08df3f524bc23eb611827ccef6e68486c1e5d7966fda2c96efda4f67eea58510
Python
16,398
571
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 9 16:52:49 2022 @author: mariano """ import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt import seaborn as sns import esprenv as env import func0 as func import funinv as funinv import setInvDict as invdict ...
9e671e0287ce89e3bb4db26e2f1e670b3db7833e68e52920b33526432557391b
Python
16,403
469
######################################################################## # Well-mixed chemical reactions. # AIMS: to verify STEPS well-mixed stochastic solver 'TetOpSplit' computes # reaction rates correctly when many different chemical species and # reactions are present in the model. # This model combines all ...
4455e05e1fcdbf694de4e5c402d0fffceea0bd819deb369c468fcf1110aefe6d
Python
16,410
416
import numpy as np import os import sys sys.path.append("./protein_autoencoder/") import torch from torch_geometric.utils import from_networkx from torch_geometric.nn import radius_graph from torch_geometric.data import Batch from torch_geometric.loader import DataLoader import matplotlib.pyplot as plt import...
d3bfefa839c0ca773c3e4b379a549b998f0067b3fed01ca4bc38319511d93aa6
Python
16,411
530
"""Implementation based on the template of ALIGNN.""" import imp import random from pathlib import Path from typing import Optional # from typing import Dict, List, Optional, Set, Tuple import os import torch import numpy as np import pandas as pd from jarvis.core.atoms import Atoms from comformer.graphs import PygG...
016f9b46a3b1b0468892a6935bc563fd9e4890a856b596a87d19784b50a1a8ee
Python
16,413
493
import math import random import cv2 import numpy as np import torch from torchvision import transforms def gray_scale(image: np.ndarray) -> np.ndarray: # language=rst """ Converts RGB image into grayscale. :param image: RGB image. :return: Gray-scaled image. """ return cv2.cvtColor(imag...
e65856d0f304da72a820c82f675d6c50531ecfa379c1622fa75665d78627b694
Python
16,430
324
import math from neuron import h from Utils.UnitsUtils import UnitsUtils from Utils.OtherUtils import * class GensForHomogenVars: def initHomogenBiophysics(self): if not h.exportOptions.isExportDistMechs: return emptyParagraphHint() lines = [] mmAl...
e6925b3f4e8631e52a4fb372ed79de68c3be1b8f7be3767922bf297d632d6a97
Python
16,448
484
import os import glob import torch import shutil import subprocess import numpy as np import pandas as pd from tqdm import tqdm from utils import ( hcluster, save_as_pdb, parse_pdb_file, parse_tm_file, parse_pae_file, assign_secondary_structures, assign_left_handed_helices ) class Pipeline: def __init__( ...
3a6ae6a53558d8cb229a2c88e25c6c8592b50bf23554180ce6348e3fcf09f236
Python
16,468
414
import inspect from typing import List import torch.nn as nn from einops import rearrange import src.models.nn.utils as U import src.tasks.metrics as M import torchmetrics as tm from src.models.nn.adaptive_softmax import AdaptiveEmbedding, ProjectedAdaptiveLogSoftmax from src.tasks.custom_torchmetrics import torchmet...
a084a4967ab8b384a855d39dc0632fe3314763caa51f4360090c657aa97a191c
Python
16,484
454
import equinox as eqx import jax import jax.numpy as jnp import jax.nn as jnn import jax.lax as lax import diffrax import jax.random as jr from typing import Union from typing import Literal from .meta_model import ModelClass class CDEFunc(eqx.Module): mlp: eqx.nn.MLP control_channels: int state_channels...
fec189eb4b426b63705febf299e55dc045e1151625aba03168071096b35996cb
Python
16,489
412
from itertools import combinations from pathlib import Path from typing import Union, Dict, Optional from MRdataset import save_mr_dataset, BaseDataset, DatasetEmptyException from mrQA import logger from mrQA.base import CompliantDataset from mrQA.formatter import HtmlFormatter from mrQA.utils import _cli_report, \ ...
91df7df201d4ff6261a80b115377d07b81e40257c46c3e2fc9ef2281ec88a501
Python
16,491
412
"""YOLO_v3 Model Defined in Keras.""" from functools import wraps import numpy as np import tensorflow as tf from keras import backend as K from keras.layers import Conv2D, Add, ZeroPadding2D, UpSampling2D, Concatenate, MaxPooling2D from keras.layers.advanced_activations import LeakyReLU from keras.layers.normalizati...
f7c823c50d0e0e119aabb5a7b69bc2c71ed41afaee1c63954bc8fefdfdd5d245
Python
16,493
466
import itertools import random from collections import Counter from typing import Callable, Dict, List, Optional, Union import numpy as np import torch from ase.data import chemical_symbols from sklearn.linear_model import Ridge from torch_scatter import scatter import hienet._keys as KEY import hienet.util as util ...
08597ac2594bf86e1823bff94990cf453056644b740e7045ff94df5e93bd65b4
Python
16,505
311
""" This script contains the classess of the layers that we have implemented for our model """ import tensorflow as tf class AttGraphConvLayer(tf.keras.layers.Layer): def __init__(self, outDim,activation=None,alphaLReLU=0.2,dropAtt=None, **kwargs): # constructor, which just calls super constructor ...
e21b893d8b1045447163da31b5d1ec6384af5f369c629037e669cca5902a7eb5
Python
16,506
311
""" This script contains the classess of the layers that we have implemented for our model """ import tensorflow as tf class AttGraphConvLayer(tf.keras.layers.Layer): def __init__(self, outDim,activation=None,alphaLReLU=0.2,dropAtt=None, **kwargs): # constructor, which just calls super constructor ...
32e1e90fd93b0143c8607a1a2d902d4fe6b6d67aa637d33e2dc05a357bdb9876
Python
16,524
405
from __future__ import annotations from itertools import combinations, pairwise import networkx as nx import pandas as pd from sklearn.base import clone from pgmpy import config from pgmpy.base import DAG from pgmpy.causal_discovery._base import BaseCausalDiscovery from pgmpy.ci_tests import get_ci_test from pgmpy.g...
b213174d8234fd99764268bdedbb0178bd19af787c6bded101b2da4414f685c9
Python
16,543
491
import typing as tp from functools import cache import numpy as np import pandas as pd from pymaid.client import CatmaidInstance from ..utils import _eval_remote_instance, DataFrameBuilder, clean_points def get_landmarks( with_locations=True, remote_instance=None ) -> tp.Tuple[ pd.DataFrame, tp.Optiona...
c00eee5b50add00535d13f73f74876577778be9c388601cd8e71fca34f5a2c7e
Python
16,546
553
"""---------------------------------------------------------------------------- This program calculates transcript integrity number (TIN) for each transcript (or gene) in BED file. TIN is conceptually similar to RIN (RNA integrity number) but provides transcript level measurement of RNA quality and is more sensitive to...
f243b8284bf12807ff3811bc087e948d3e5e1612ecf087a8fd1f9196356fd3e2
Python
16,553
429
'''runExpression.py - wrap various differential expression tools ============================================================= :Tags: Python Purpose ------- This script provides a convenience wrapper for differential expression analysis for a variety of methods. The aim of this script is to provide a common tabular...
520258c9dfc0addd58aa39562ece664ca09cb70a8e6e867be4bc4295963a7616
Python
16,567
390
#################################################################################### # # 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...
28ef8c553485523522ef75d993c3ee6145157b9fad6232cf570c61077a74a1f9
Python
16,572
371
from itertools import combinations import pytest from pgmpy.base import ADMG, DAG, MAG, PDAG from pgmpy.base._base import _CoreGraph @pytest.fixture def AncestralGraph(): """ References ---------- [1] Zhang, Jiji. "Causal Reasoning with Ancestral Graphs." Journal of Machine Learning Research 9 (...
f16d5126bea6007cc928ce64e0ce8643c03225ab5853ad208fd199a5faaed3f2
Python
16,606
442
# Copyright (c) <2021> <University of Paderborn> # Signal and System Theory Group, Univ. of Paderborn, https://sst-group.org/ # https://github.com/SSTGroup/independent_vector_analysis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated d...
6842b416ff9c203efe860014ac82163ef8a76901d471d459bd2123222ed0f0c6
Python
16,614
444
import os import ast import operator as op import logging # dictionary of supported operators # ops = {ast.Add: op.add, ast.Sub: op.sub, ast.Mult: op.mul, ast.Div: op.truediv, ast.Pow: op.pow, ast.USub: op.neg} # list of operators we support: # Matlab | Python # Matrix operators: # matrix mu...