gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
""" Model definition functions and weight loading.
"""
from __future__ import print_function, division
from keras.models import Model, Sequential
from keras.layers.merge import concatenate
from keras.layers import Input, Bidirectional, Embedding, Dense, Dropout, SpatialDropout1D, LSTM, Activation
from keras.regulariz... | |
#
# This is Seisflows
#
# See LICENCE file
#
###############################################################################
# Import system modules
import sys
# Import Numpy and Obspy
import numpy as np
import obspy
# Local imports
from seisflows.tools import msg, unix
from seisflows.tools.tools import exists, gets... | |
from ..titanic import digital
from ..titanic import gmpmath
from ..titanic.ops import OP
class MPNum(digital.Digital):
# must be implemented in subclasses
@classmethod
def _select_context(cls, *args, ctx=None):
raise ValueError('virtual method: unimplemented')
@classmethod
def _round_to_... | |
import logging
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.utils.encoding import smart_unicode
from restlib2.http import codes
from restlib2.params import StrParam, IntParam, BoolParam
from modeltree.tree import MODELTREE_DEFAULT_ALIAS, trees
from avocado.events import usage
... | |
#! /usr/env/python
"""
This module attempts to "component-ify" GT's Fastscape stream power erosion.
Created DEJH, March 2014.
"""
from __future__ import print_function
import numpy
import warnings
from landlab import ModelParameterDictionary, Component
from landlab.core.model_parameter_dictionary import MissingKeyErr... | |
import logging
import os
import shutil
import tempfile
from crawler_exceptions import CrawlError, CrawlUnsupportedPackageManager
from utils import osinfo
from utils.features import PackageFeature
from utils.misc import subprocess_run
logger = logging.getLogger('crawlutils')
def get_dpkg_packages(
root_dir='... | |
import math
import os
import threading
from collections import defaultdict
from typing import Dict
import copy
from twisted.internet.address import IPv4Address
import bptc
from bptc.data.consensus import divide_rounds, decide_fame, find_order
from bptc.data.event import Event, Parents
from bptc.data.member import Membe... | |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | |
# -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Parser for MOPAC output files"""
# Based on parser in RMG-Py by Greg Magoon
# https://github.com/ReactionMechanismGene... | |
from __future__ import print_function, unicode_literals
import re
from decimal import Decimal as D
from aspen import Response
import pytest
from gratipay.security.user import SESSION
from gratipay.testing import Harness
from gratipay.wireup import find_files
overescaping_re = re.compile(r'&(#[0-9]{4}|[a-z]+);'... | |
from django.contrib import admin
from django.contrib.admin import SimpleListFilter
from django.db import models
from django.db.models.fields import CharField, TextField
from django.forms import Textarea, ModelForm
from import_export.admin import ImportExportModelAdmin
from solo.admin import SingletonModelAdmin
from .m... | |
"""
Tests for both experiment.py and experiment_set.py
"""
import pytest
from snovault import TYPES
# from snovault.storage import UUID
from uuid import uuid4
from ..types.experiment import ExperimentHiC
pytestmark = [pytest.mark.setone, pytest.mark.working]
@pytest.fixture
def custom_experiment_set_data(lab, aw... | |
'''tzinfo timezone information for Australia/NSW.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class NSW(DstTzInfo):
'''Australia/NSW timezone definition. See datetime.tzinfo for details'''
zone = 'Australia/NSW'
_utc_t... |
End of preview. Expand in Data Studio
- Downloads last month
- 2,871