sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
fa1a3c191013120b0f24846b15b856973f987c103c5454a2fa4b8280c8bf0fab
Python
32,937
743
#!/usr/bin/env python # -*- coding: utf-8 -*- #Version Jela! 5.5 import xml.dom.minidom as dom import xml.dom from decimal import * import sys import os import datetime #from Numeric import * # Dokument erzeugen implement = xml.dom.getDOMImplementation() ###################Globale Variablen################### musi...
13b5bef0aa6bf99ee24731a68d4144f2cc2932acb3116fb32f623a2346ba7767
Python
32,973
781
import numpy as numx import pydeep.base.numpyextension as numxExt from pydeep.base.activationfunction import Sigmoid import pydeep.misc.visualization as VIS import pydeep.misc.io as IO from scipy.signal import convolve2d # Set the same seed value for all algorithms numx.random.seed(42) class Weight_layer(object): ...
f2436287e4ce33af94d05bdf2be477e206ba23cd2dbd7053275488b47fdcfa0f
Python
33,005
891
import sys import os import re import string import datetime import steps if(sys.version_info >= (3,0)): import configparser as cfg_parser else: import ConfigParser as cfg_parser class Parser(object): """ Matlab to STEPS parser to convert a Matlab simbiology model into a STEPS model. The ...
6b8b2b74d9148c2beecf7eefd8f5bf94b51da6481bb0ed512499928303bf6afe
Python
33,054
751
# 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 ...
210a52722e5f424c0bbcfd1a27455338b2150ca27b2ee57ef89c3099e3babdd9
Python
33,057
925
from __future__ import annotations import inspect import json import os import re import shutil from collections.abc import Callable from dataclasses import dataclass from pathlib import Path from typing import Any DEFAULT_SITE_URL = "https://pgmpy.org" DEFAULT_VERSIONS_FILE = Path(__file__).resolve().parents[1] / "v...
96730f89877fac718d019a8408bd74c1f1ebca652c8b799fb211490ae88e60b0
Python
33,065
783
import numpy as numx import pydeep.base.numpyextension as numxExt from pydeep.base.activationfunction import Sigmoid import pydeep.misc.measuring as MEASURE import pydeep.misc.visualization as VIS import pydeep.misc.io as IO from scipy.signal import convolve2d from sklearn.linear_model import LogisticRegression # Set ...
29f1ea842313464d65c7288bf512d1ebfde9a7ff90fc8834f5a51519f9209ee2
Python
33,095
910
from types import ModuleType import copy import pylab import numpy as np import pandas as pd import os from matplotlib.patches import Polygon from matplotlib.text import Text from matplotlib.markers import TICKDOWN import matplotlib import networkx as nx import ast import json import pickle import defaultSimulate as d...
503e32f97db692eb59150080ce5967cc545f5f43b490cd2cb491972464d8ea16
Python
33,108
680
import os import gc import argparse import json import random import math import random from functools import reduce import numpy as np import pandas as pd from scipy import sparse from sklearn.model_selection import train_test_split, ShuffleSplit, StratifiedShuffleSplit, StratifiedKFold from sklearn.metrics import acc...
0cddf24ebdee86be5e8801930d95a7f775b770f9b8195719ebf5cb83c635897b
Python
33,128
765
#!/usr/bin/env python # -*- coding: utf-8 -*- # :noTabs=true: # (c) Copyright Rosetta Commons Member Institutions. # (c) This file is part of the Rosetta software suite and is made available under license. # (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. # (c) For more inform...
40181fd77aea8041348521251b43903298ccdcdd543a9b1403415802ea9d4d06
Python
33,140
936
import pylab import numpy as np from scipy.signal import convolve2d from scipy.stats import gamma from bisect import bisect_right import unittest import os from scipy.integrate import quad from scipy.optimize import fmin from scipy import vectorize import pickle import pyximport pyximport.install(setup_args={"include_d...
a79783c0b34f68a81d415153d4e1dd912bb3d047714a59033eefec7f936fab60
Python
33,145
744
import random from torch.utils.tensorboard import SummaryWriter import time import argparse import torch from torch import optim from torch.optim.lr_scheduler import StepLR from models import ModeFormer, SRCNN, UNet, RDN, Wrapper from models_FNO import FNO2d from DataLoader import PDEDataset, train_valid_test_split fro...
6b8ff3627060f5b875ef1a96ddd3a699d77dcc82b9fefcf197e050283d850f7f
Python
33,208
804
# This file borrowed from Swin-UNet: https://github.com/HuCaoFighting/Swin-Unet import torch import torch.nn as nn import torch.utils.checkpoint as checkpoint from einops import rearrange from timm.models.layers import DropPath, to_2tuple, trunc_normal_ class Mlp(nn.Module): def __init__(self, in_features, hidden...
2b7edbe583fe3eac003c5ced97aee4b48a48777fd2b5a096b3287b9102c7656d
Python
33,245
769
# 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 ...
a7fbd0da4ca0b0cc77e3a3ad8ed223e6d1fb33676e8e1785169d9fea32d2af16
Python
33,263
853
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...
5d607e53779ee75d9a03b7c88d3545a5b65b743322c0d34d25bb50c4806eb5c5
Python
33,300
756
# -*- coding: utf-8 -*- from __future__ import print_function import json, time, os, sys, glob import shutil import numpy as np from collections.abc import Sequence import math PI = math.pi import torch import random from torch import optim from torch.utils.data import DataLoader import torch.utils import torch.utils.c...
0ea7ec4554e94b738251b30782fb38c0d3cdcf49fc7f8efe18e28415685bee30
Python
33,339
855
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...
9c429b35478a540587ca748c4c23698762b2312a02147d0b0a44907c6c60e8b3
Python
33,379
934
#################################################################################### # # 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...
03949645bfe016c6b8b4c5f0e7b9f83b0210bd9560ce0c0f6e98bcea077e67f1
Python
33,395
934
#################################################################################### # # 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...
99b9b51894127ba95fc63645e4af7f4bc2206af59b50a72684caf524a29fe610
Python
33,409
698
# -- coding: utf-8 -- # @Time : 2023/4/3 18:26 # @Author : Biao Zhang # @Email : littlebiao@outlook.com # @File : analysis_anatomical.py # @Description: This file is used to ... 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 matplotli...
3e83fd0a91585559734fb0c7e7979f9d66b705483f6d3872a73bde1522c591dd
Python
33,452
843
""" This module provides utility functions related to training a VAMPnet model on molecular dynamics simulation data as well as analyzing its results. """ import numpy as np import h5py import os import pyemma as pe pe.config.mute = True import yaml import itertools import mdtraj as md from os.path import join from sc...
0eb5bcc028939c772760aa764242f7a4cbdc776af07999b1fb6a9456afc26a5e
Python
33,524
687
import os import gc import argparse import json import random import math import random from functools import reduce import numpy as np import pandas as pd from scipy import sparse from sklearn.model_selection import train_test_split, ShuffleSplit, StratifiedShuffleSplit, StratifiedKFold from sklearn.metrics import acc...
748ff4d9a1f59dad7067cd2a17be78302d6d30831ae2f991c1ca4ca8808cdc24
Python
33,547
752
import numpy as np from tqdm import tqdm from pensa.features import * from pensa.statesinfo import * # -- Functions to calculate SSI statistics across paired ensembles -- def ssi_ensemble_analysis(features_a, features_b, all_data_a, all_data_b, torsions=None, pocket_occupancy=None, pbc=True, ...
8e363bdd10971c0a58560f8ed159c45e818d61f707940318d0217d3e479661ea
Python
33,554
702
#################################################################################### # # 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...
3278281c284e935a40004fae1b1f6a703298981d1a7057d8fefbb512e5dadbdb
Python
33,580
804
"""unit tests for the summary-spreadsheet/cohort-spreadsheet pieces of api/results_bundle.py - pure function tests, no FastAPI/mesh pipeline needed, same style as test_craniometrics.py/test_metopic.py testing the underlying math directly. _report_pdf's own layout isn't covered here beyond the line-advance arithmetic b...
8ec9c1a861a8f6604e5f9caf9f812697c532040240513e9d09d21a139b29438d
Python
33,677
916
# This file is part of the markovmodel/deeptime repository. # Copyright (C) 2017, 2018 Computational Molecular Biology Group, # Freie Universitaet Berlin (GER) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by...
e6597765b0b75e82c1ea31ff5cb5786796f2ea13e6fd9fb3d7a74b63f8aa540e
Python
33,697
924
# This script is part of navis (http://www.github.com/navis-org/navis). # Copyright (C) 2018 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...
f3b072e6a77ef9365f088346822d56947986b40f5147dcd6a270eff87fb9a4f0
Python
33,704
832
"""Pytorch script for training SE(3) protein diffusion. To run: > python experiments/train_se3_diffusion.py Without Wandb, > python experiments/train_se3_diffusion.py experiment.use_wandb=False To modify config options with the command line, > python experiments/train_se3_diffusion.py experiment.batch_size=32 ""...
423968497bfbb8bbcc866c775e732ae6b59e1e7560b888a2ca15f708484a64bb
Python
33,741
607
# 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...
0a9d35b275a73fc6094c2a00a5eb0e6e6b2c914b70bea2ec323914bdeeb0a7b6
Python
33,763
841
"""Compat bridge: convert `AIMessageChunk` streams to protocol events. The bridge trusts `AIMessageChunk.content_blocks` as the single protocol view of any chunk. That property runs the three-tier lookup (`output_version == "v1"` short-circuit, registered translator, or best-effort parsing) and returns a `list[Conten...
331468e71307fc0d0b48de9b9a2a28ed6b1404e1fd457304e7e72b0ed402bffb
Python
33,797
754
import torch import math import copy from .activation import ( SmoothLeakyReLU, check_activation_name, get_activation, has_scalars, add_dropout, prepare_activation_forward_param, LinearSwiGLU, LinearSquare, SwiGLU ) from .layer_norm import ( get_normalization_lay...
c882f9d581df48d7a807b157ae779491c3d052f406c262ae72d48c1e64e4cd1d
Python
33,833
756
# 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...
a67c336263c5f86e65dfaccbb24cd91ad523d75413ccd387b6c6e2a515c2c26a
Python
33,872
917
#################################################################################### # # 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...
db8cbd88df80806fcd8f9cd881acbee12989f0d1efeba4ef05a1832d045bcffa
Python
33,888
917
#################################################################################### # # 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...
1247b428ad4ac960ebce12e9b4118acd1791d821fecd8d5cfae399adb810fc11
Python
33,922
1,029
from ChipseqReport import * import xml.etree.ElementTree import Glam2 def computeMastCurve(evalues): '''compute a MAST curve. see http://www.nature.com/nbt/journal/v26/n12/extref/nbt.1508-S1.pdf returns a tuple of arrays (evalues, with_motifs, explained ) ''' if len(evalues) == 0: rais...
69014cf64b005d2b90541d208be454ba6eae70848b32a639e6586f26d7ef335a
Python
33,927
951
import concurrent.futures import threading import time import unittest.mock import uuid from typing import Any from uuid import UUID import pytest from langsmith import Client from langsmith.run_trees import RunTree from langsmith.utils import get_env_var, get_tracer_project from langchain_core.messages import AIMess...
0fb8458a894b6be16195d5d63709dde2a7824db026b100ce314d29c3d03d019c
Python
33,946
856
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This experiment was created using PsychoPy3 Experiment Builder (v2021.2.3), on 8月 23, 2022, at 10:39 If you publish work using this script the most relevant publication is: Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv J...
b3ed4d2620134256690f5512fef47442a5227fdd81a0fb49da621e5acc728601
Python
34,020
722
# -- coding: utf-8 -- # @Time : 2023/4/3 18:26 # @Author : Biao Zhang # @Email : littlebiao@outlook.com # @File : analysis_anatomical.py # @Description: This file is used to ... 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 matplotli...
f992d0f20b87e9d68a96b5fd3850a033b75db169080bf26e40f65e7c767dce60
Python
34,036
1,088
""" Tests for I/O functionality of the toolkit wrappers """ import pathlib import sys import tempfile from io import BytesIO, StringIO import numpy as np import pytest from numpy.testing import assert_allclose from openff.toolkit import Quantity, unit from openff.toolkit._tests import create_molecules from openff.t...
cf6824701fbe272151ae79e1c2aab3dfbb4a5cc620255204585a2b1ebb4aad88
Python
34,054
744
""" This is a modified version of fourier_2d_time.py from https://github.com/zongyi-li/fourier_neural_operator """ import datetime import os import random # os.environ["CUDA_VISIBLE_DEVICES"]="7" # TODO: for debugging from models.FNO import FNO2d, FNO3d from models.GFNO import GFNO2d, GFNO3d from models.GFNO_steerable...
3f2ada5ce08b3df341b05ec50bf37d876e8de727e3a70dadee7fcccea085bf40
Python
34,057
744
""" This is a modified version of fourier_2d_time.py from https://github.com/zongyi-li/fourier_neural_operator """ import datetime import os import random # os.environ["CUDA_VISIBLE_DEVICES"]="7" # TODO: for debugging from models.FNO import FNO2d, FNO3d from models.GFNO import GFNO2d, GFNO3d #from models.GFNO_steerabl...
c58861f6119304d73a22dce043bccdd4bffc7f45241823fdcb21a2f2f9a7a7fa
Python
34,093
860
import torch from torch import nn import torch.nn.functional as F from copy import deepcopy from torch.jit.annotations import List, Dict, Tuple from torch import Tensor import numpy as np from typing import Iterable from torchvision.ops import roi_align from Unet import UNet from MuTILs_Panoptic.configs.panoptic_model...
9a84a6bc73888f490b407608dab2b14220a31f99d45be04ab9b55e3986830a85
Python
34,095
916
# -*- coding: utf-8 -*- # author: Felix Repp felix.repp@mpikg.mpg.de # !/usr/bin/env python """@package tinaskel %This module provides the tools to obtain a network structure from the skeletonized images. A nice description of the skeletonization process can be found [here](http://www.inf.u-szeged.hu/~palagyi/skel/sk...
64d0143887580389ca1a109150c5a0611739250a92ae7b5b3dd24219c5f1453e
Python
34,152
721
import numpy as np import tensorflow as tf from tensorflow.keras.utils import to_categorical from scipy.signal import convolve2d import matplotlib.pyplot as plt import copy import cv2 import gc from load_save_helpers import find_matching_masks, list_imgs_and_sizes, get_image_list, load_image_list, distance_maker, prime...
fbff851e8723e60d587a2817865d5beb43acc08c436b8fbbeeaed15e87b5a192
Python
34,234
734
import numpy as np from copy import deepcopy import time import pickle import sys import signal sys.path.append("..") import ClusterHelper import GeneralHelper import nest class ClusteredNetworkBase: """ Creates an object with functions to create neuron populations, stimulation devices and recording dev...
8f705da359b1b09bfa0678cfd55ebb83ea9d0030ca2adbd2a9d737f7ca0207f4
Python
34,269
828
"""Load LangChain objects from JSON strings or objects. ## How it works Each `Serializable` LangChain object has a unique identifier (its "class path"), which is a list of strings representing the module path and class name. For example: - `AIMessage` -> `["langchain_core", "messages", "ai", "AIMessage"]` - `ChatPro...
105beaadd07977b456ac911cda6a79f628fdb94afd598eaa4a329267a8214e77
Python
34,330
747
import traceback from pathlib import Path import dask.array as da import numpy as np import seaborn as sns import yaml from matplotlib import gridspec, pyplot as plt from shiny import App, reactive, render, ui from astrocast import detection from astrocast.preparation import Delta, IO class Explorer: def _...
cce5ef357b3e516d6bca88c0c380a69d21d17f1f03dd1175202aed3b303da754
Python
34,334
1,066
"""=========================== Variant annotation pipeline =========================== :Author: Andreas Heger & David Sims :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 ...
f96890a99fc951de4bdd912af37863d054295b5b31af1e54026ac5da6d68f720
Python
34,397
949
"""Middleware that exposes a persistent shell tool to agents.""" from __future__ import annotations import contextlib import logging import os import queue import signal import subprocess import tempfile import threading import time import uuid import weakref from dataclasses import dataclass, field from pathlib impo...
023972873cbbdc44864b1ba0ecd62464cf2571cbefa07408163b2cb5f50c9ac0
Python
34,440
843
# Author: Katiana Kontolati # Last update: Sept. 12, 2022 # Important: Make sure to: $conda activate latent_deeponet before running this script!! import keras import numpy as np import matplotlib.pyplot as plt #from IPython import get_ipython #get_ipython().run_line_magic('matplotlib', 'inline') import tensorflow as t...
1cc5dac50103c63e493d85f6ca1b71d60755eaa4438e1631805360594c418bb0
Python
34,550
1,003
# This script is part of navis (http://www.github.com/navis-org/navis). # Copyright (C) 2018 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...
20becca5a90c01958e6897ba739bd4357d04a590c44954a373fcf61242a7c742
Python
34,626
607
import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import Subset, Dataset import pandas as pd import numpy as np import random import json, os import h5py import scipy from scipy.sparse import csr_matrix import pysam from torch.utils.data.dataloader import DataLoader, Sampler from tqdm...
29e613b5764fcff61cf867003bc26e528a76089f9dcad47f2ac7f27b33ad265f
Python
34,629
1,049
"""=========================== Pipeline IDR =========================== Overview ======== This pipeline is a wrapper for the Irreproducibility Discovery Pipeline outlined by Anshul Kundaje. (see https://sites.google.com/site/anshulkundaje/projects/idr) It is split into two stages and performs several basic steps: F...
25ca1192f79a59c07becdffc41ae6592a9b5f01fec22e0f1e527cd2f9d1d6d6f
Python
34,641
820
import logging from typing import List, Literal, Tuple, Union import numpy as np import pandas as pd import seaborn as sns import torch import torch.nn as nn import torch.nn.functional as F from matplotlib import pyplot as plt from matplotlib.lines import Line2D from torch.utils.data import DataLoader, Dataset from a...
c0c85c6f57a77da408674668f65da14908f505c24acb0bab5130fc8d8bafdbfd
Python
34,663
925
import argparse import torch from torch import nn import numpy as np from data import get_dataset import pandas as pd import pickle as pk from pymatgen.io.jarvis import JarvisAtomsAdaptor from pymatgen.core.lattice import Lattice from pymatgen.core.structure import Structure from jarvis.core.atoms import Atoms from tor...
b0be86ed7707608a724842851af440195609187f7ab22f829a0a83a8142e8c7d
Python
34,741
926
"""Training and testing functionality for the de novo peptide sequencing model.""" import glob import logging import os import tempfile import warnings from pathlib import Path from typing import Iterable, List, Optional, Sequence, Union import lightning.pytorch as pl import lightning.pytorch.loggers import torch fro...
542ff02040a30ec0c87ce2f6449a927b2f637f6e81792209bcf5f00b521eb5bc
Python
34,825
804
#################################################################################### # # 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...
30c4085699c83521d487081ac3592e412ce92275f493c41d15aaccde7e67af3c
Python
34,826
804
#################################################################################### # # 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...
6ea731d4e27595871171624f4d43ea284224427b2901f0a27f050f89d7e56acc
Python
34,863
644
import numpy as np import tensorflow as tf from tensorflow.keras.layers import Lambda from abc import abstractmethod class Muscle: """Base class for `Muscle` objects. If a plant contains several muscles, this object will contain all of those in a vectorized format, meaning for any given plant there will alway...
2b4172352d78629b1a7f7d7f53950b6d4af9aef51322a89e3078e3c96d192cf1
Python
34,965
897
# 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 # # Unless required by applicable law or agr...
55b19d8378a43d0b8664f270e98a04e7d54614e496511d7816b460a2d71e8352
Python
34,974
915
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import List, Optional, Tuple, Union import torch from torch import nn from .activations import ACTIVATION_REGISTRY # from .fourier import SpectralConv2d from functools import partial # Largely based on https://github.com/labmlai/an...
cd37212ea3c532539b635b94e05e0926e5348ceb16cc982111ec0b9a3a42e2b5
Python
35,007
961
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import dash_bootstrap_components as dbc import plotly.graph_objects as go from dash import Dash, dcc, html metric_options = [ "euclidean", "cosine", "manhattan", "chebyshev", "minkowski", "canberra", "braycurtis", "haversine", "mahalan...
2688a9e4dbb5e51d7f5fb70271b21844dc64fe8fc4448382d1557b318d71cc1c
Python
35,057
818
import numpy as numx import pydeep.base.numpyextension as numxExt from pydeep.base.activationfunction import Sigmoid import pydeep.misc.measuring as MEASURE import pydeep.misc.visualization as VIS import pydeep.misc.io as IO from scipy.signal import convolve2d import scipy.ndimage.interpolation as sci from sklearn.line...
f61a1af39957e3569018851c3ca359e4c1c5357003bfe453da5aa1e70a110d35
Python
35,115
967
import torch import torch.nn as nn from h3xsemble.utils.rigid_utils import Rigid from h3xsemble.utils.residue_constants import restype_atom14_to_rigid_group, chi_angles_mask from h3xsemble.model.primitives import Linear from h3xsemble.model.structure_module import ( InvariantPointAttention, InvariantPointAtte...
fbf42e5b37b34a3d327fe512dc84fcca3bb388d0d3667f92fe81bba6308c29dc
Python
35,153
989
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...
6bd76d5022cc66276daacb1cc700cac22b1a0fda6596062f9e17badc1e6ad456
Python
35,175
855
from __future__ import print_function import json, sys, os, math, argparse, time import multiprocessing as mp from cytoolz.itertoolz import partition_all import svtyper.version from svtyper.parsers import Vcf, Variant, Sample, SamFragment, confidence_interval from svtyper.utils import die, logit, prob_mapq, write_sam...
a25cc34b41574e62e01bc09aa0d16cf36fe2d5150cd0be5bdf323a7305483965
Python
35,236
969
#!/usr/bin/env python """ Generate poses for relative free energy calculations using fragment structures """ from openeye import oechem import numpy as np import logging logging.basicConfig(level=logging.INFO) def GetFragments(mol, minbonds, maxbonds): from openeye import oegraphsim frags = [] fptype = o...
618f36dbd567bb5a91ffdaf0202407f8da1755cadba9e7bbd1d01bbe19b15171
Python
35,277
971
# Rewritten to mirror aedann.py but using KANLinear instead of nn.Linear. from typing import Any, Optional, Tuple, List # try: import torch from torch import nn from torch.autograd import Variable import torch.nn.functional as F from torch.autograd import Function # TORCH_AVAILABLE = True # except ImportError: # T...
a365e7f8658f5c94ec71ed571d81ca44a0c10bf9695ca82920c666a942e19038
Python
35,374
807
import warnings from collections import deque from collections.abc import Callable, Generator, Hashable from itertools import combinations, permutations import networkx as nx import numpy as np import pandas as pd from joblib import Parallel, delayed from skbase.base import BaseObject from sklearn.base import BaseEsti...
fbc58be14c827945e05fb613d46ab61aa56ab1b725af19b6931b3e9f4fe414e2
Python
35,381
928
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import List, Optional, Tuple, Union import torch from torch import nn from pdearena.modules.activations import ACTIVATION_REGISTRY from .condition_utils import ConditionedBlock, fourier_embedding, zero_module from .fourier_cond impo...
ed8b93b35180a7d4d142d4cec4f1093cbc274067d0b8515a05d4305f9ef9375b
Python
35,554
1,015
import numpy as np import os from omegaconf import DictConfig import torch import torch.nn.functional as nn from rfdiffusion.diffusion import get_beta_schedule from scipy.spatial.transform import Rotation as scipy_R from rfdiffusion.util import rigid_from_3_points from rfdiffusion.util_module import ComputeAllAtomCoord...
c14420a6f7626b275080d8e1b8bd5eb940096662d08b4df30d0a5daab4d64f06
Python
35,598
1,007
#################################################################################### # # 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...
1e1a7def7834be803dfbc989784c08982e04ad8b54280e6dfd2653c45f2b2bf4
Python
35,607
866
# Author: Katiana Kontolati # Last update: Sept. 12, 2022 # Important: Make sure to: $conda activate latent_deeponet before running this script!! import keras import numpy as np import matplotlib.pyplot as plt #from IPython import get_ipython #get_ipython().run_line_magic('matplotlib', 'inline') import tensorflow as t...
11b296af85c7efb0b9b0ad54fed4de815180b376294457570ac8b6c65ff3d790
Python
35,633
674
__author__ = 'dominic rufa' """ Application API for setting up perses relative free energy calculations on Folding@Home. argv[1]: setup.yaml (argument for perses.app.setup_relative_calculation.getSetupOptions) """ import numpy as np import os import simtk.unit as unit from simtk import openmm import logging import da...
beeee42afc338d2180584c8325ad285b661def8dbe39747ef8c3096e80d4b0ac
Python
35,652
675
__author__ = 'dominic rufa' """ Application API for setting up perses relative free energy calculations on Folding@Home. argv[1]: setup.yaml (argument for perses.app.setup_relative_calculation.getSetupOptions) """ import numpy as np import os import simtk.unit as unit from simtk import openmm import logging import da...
a8d75afbc5780bf974436a880d42c120b836b8c8368a6e8319c2185013aa73f5
Python
35,695
1,040
#!/usr/bin/env python # ============================================================================= # MODULE DOCSTRING # ============================================================================= """ General utility functions for the repo. """ # ================================================================...
4cd5f21aec461cd8ebcba448345a6edfe49889387537cbe5add2ccd0b314106c
Python
35,718
897
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...
0d21da3e3f3a6f24fcf3535e09965ba1f11dc863fddda3c3160aa09ba4547eb2
Python
35,726
961
from einops import rearrange from copy import deepcopy from nnsegnext.utilities.nd_softmax import softmax_helper from torch import nn import torch import numpy as np from nnsegnext.network_architecture.initialization import InitWeights_He from nnsegnext.network_architecture.neural_network import SegmentationNetwork imp...
26669c2abaebcd5c989a1ade1cb8b5ede0b265035b2b3e58da3dab220706f173
Python
35,730
961
from einops import rearrange from copy import deepcopy from nnsegnext.utilities.nd_softmax import softmax_helper from torch import nn import torch import numpy as np from nnsegnext.network_architecture.initialization import InitWeights_He from nnsegnext.network_architecture.neural_network import SegmentationNetwork imp...
3ccdaefaa29882767b0c41f13472e1960c05bd42a7fe895f0782be63e306c6f3
Python
35,764
957
"""Utilities for working with genome neighbors (complete genomes) from NCBI. """ from collections import defaultdict import datetime import gzip import http.client import logging import random import re import socket import tempfile import time import urllib.parse import urllib.request from xml.dom import minidom from...
d9f9c24b65e88e9898542f8d10f7bbf1f29c4cfb5d659876b2b93d30f94cbf26
Python
35,778
713
import os import argparse import random import numpy as np import pandas as pd from scipy import sparse from sklearn.model_selection import train_test_split, ShuffleSplit, StratifiedShuffleSplit, StratifiedKFold from sklearn.metrics import accuracy_score, f1_score, confusion_matrix, precision_recall_fscore_support, cla...
d9d007379a82a463b046bd894ffb55edbaf6780bf276f1ac27767ccace2204e0
Python
35,831
863
# Standard library imports import os import math import itertools from itertools import cycle # Third-party imports import torch from bernn.utils.mlflow_compat import mlflow, MLFLOW_AVAILABLE import sklearn import numpy as np try: import tensorflow as tf except ImportError: # TensorFlow is optional for lightweigh...
b9ead987172cc14776a36d6429ad2a5464a8e4f65e5782f61a68741fc039f260
Python
35,904
1,101
"""Internal tracer to power the event stream API.""" from __future__ import annotations import asyncio import contextlib import logging from typing import ( TYPE_CHECKING, Any, TypedDict, TypeVar, cast, ) from typing_extensions import NotRequired, override from langchain_core.callbacks.base impo...
83a04f32d6f64777d41e9ba9bdb81a2910bab098a067dac3dafbcfe4467f7851
Python
35,906
761
# Modified from: PDEBench/pdebench/data_gen/data_gen_NLE/CompressibleFluid/CFD_multi_Hydra.py #!/usr/bin/env python # -*- coding: utf-8 -*- """ <NAME OF THE PROGRAM THIS FILE BELONGS TO> File: CFD_multi_Hydra.py Authors: Makoto Takamoto (makoto.takamoto@neclab.eu) NEC Laboratories Europe GmbH, Copyr...
c0c8de0e75e86052b233acd342ec8c1e71f946414f429e19980c2f0b19a02344
Python
35,911
885
# Author: Katiana Kontolati # Last update: Sept. 12, 2022 # Important: Make sure to: $conda activate latent_deeponet before running this script!! import keras import numpy as np import matplotlib.pyplot as plt #from IPython import get_ipython #get_ipython().run_line_magic('matplotlib', 'inline') import tensorflow as t...
d298927c803ca3fa7bb498b0263c266269c4a4abfe3f80c253d7edf894ebfcf3
Python
35,925
810
__docformat__ = "restructuredtext en" import mdp from mdp import numx import pydeep.rbm.model as MODEL import pydeep.rbm.trainer as TRAINER import pydeep.rbm.estimator as ESTIMATOR class BinaryBinaryRBMNode(mdp.Node): ''' Implementation of a restricted Boltzmann machine with binary visible and binary hi...
a33cc372f1a478ca852e91440f8bd146f7f8715bb6051db6a9ed5a56ad8ac055
Python
36,144
887
# 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 ...
7d72307e1a3be6ab5ca379bbbc25daa390f22e8bf07dd0de94b91e9d74ebe144
Python
36,154
1,009
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...
ff097158cf234645ab02714fa2a8d9f5b165e6f315d677da9183fa4200f59c13
Python
36,156
1,025
#################################################################################### # # 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...
9929b15f6a82ecdb685f40924244c506dfb14a8071b34cc2de4d531809c9bdc5
Python
36,167
734
# 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...
d03f42a274f49c3c0d7ec4d3323db263ba3fbe4b7cdb4455bcdd94502aa04634
Python
36,246
527
""" Class for evalutating datasets with different properties. :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 ...
7a555d10275d7dd8a7a1ca1dbe92219d6a950890013bbfdb2ed931f724a1a8fb
Python
36,292
956
import re import copy import importlib import ml_collections as mlc def set_inf(c, inf): for k, v in c.items(): if isinstance(v, mlc.ConfigDict): set_inf(v, inf) elif k == "inf": c[k] = inf def enforce_config_constraints(config): def string_to_setting(s): path...
76979c76173b55b00c41caec63c7e74891ccd92531ecae567c5d7a1839ee8d17
Python
36,337
715
import os import gc import argparse import json import random import math import random from functools import reduce import numpy as np import pandas as pd from scipy import sparse from sklearn.model_selection import train_test_split, ShuffleSplit, StratifiedShuffleSplit, StratifiedKFold from sklearn.metrics import acc...
ea3f51eb1c03b130f638ad4d637965c52d46876eace7f1743c72fe4ae55ba4fc
Python
36,337
891
from typing import List, Union from collections import namedtuple from pathlib import Path from abc import ABC, abstractmethod import numpy as np import pandas as pd import scipy.signal as signal import matplotlib import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation matplotlib.rc('animation'...
1ee2cd5351f5fb0f9d0ac26e56f6aa1ec9baa4158d87d0c13c01a238e57736b9
Python
36,365
1,018
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...
3c56c7323ad63be82b7a8bbce42e0e26acb84031496d3424be00b238a67fc21a
Python
36,429
721
import os import gc import argparse import json import random import math import random from functools import reduce import numpy as np import pandas as pd from scipy import sparse from sklearn.model_selection import train_test_split, ShuffleSplit, StratifiedShuffleSplit, StratifiedKFold from sklearn.metrics import acc...
cd05b118f079529360273dba4b52c955d0b31e22916fb82e40e7546c16bbf508
Python
36,438
993
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...
234482bee4ab833017d94be0f53bf4fff0672af413c682c83c1917267a787aa2
Python
36,445
1,001
"""Equations related to Navier Stokes Equations with coordinate transformation """ from sympy import Symbol, Function, Number from sympy import exp , Matrix import numpy as np from modulus.eq.pde import PDE from modulus.node import Node from typing import Optional, Callable, List, Dict, Union, Tuple from ...
163ad169bd1a51828c2995ba43ccbcb5b0ff9d16bced079fa08a2367ef65788b
Python
36,453
1,020
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...
e6912f2470b7765a06e30a5bc8e75abd45f8d4aac7d01365eba490fe94543705
Python
36,497
1,072
""" Copyright (c) Facebook, 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. """ import ast import collections import copy import importlib import itertools import json import logging import os import sys import time from ...
43981a064517b0b5ef14ea6b7ca3b39cfa659237cc202aab6b21d98320c4a6d7
Python
36,527
727
import os import gc import argparse import json import random import math import random from functools import reduce import numpy as np import pandas as pd from scipy import sparse from sklearn.model_selection import train_test_split, ShuffleSplit, StratifiedShuffleSplit, StratifiedKFold from sklearn.metrics import acc...