gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" In this file we define the "Right Hand Side" of the dynamics for the Magneplane concept to be used by the pointer framework, and create an OpenMDAO problem to solve the optimal control problem using Pointer. """ import numpy as np from openmdao.core.component import Component try: from openmdao.drivers.pyopt...
#!/usr/bin/python #### workflow #### # 1. get all datatsets within date range # 2. put dataset pairs into input_queue # 3. start worker threads with input_queue # 3a. load dataset into prefix trees pt0 and pt1 # 3.b calc stats for prefix trees pt0 and pt1 # 3.c calc diffs for prefix treees (pt0,pt1) # 4. start output ...
# -*- coding: utf-8 -*- """Dependency graph implementation.""" from __future__ import absolute_import, print_function, unicode_literals from collections import Counter from textwrap import dedent from kombu.utils.encoding import bytes_to_str, safe_str from celery.five import items, python_2_unicode_compatible __all...
# Copyright (c) 2012 Cloudera, Inc. All rights reserved. # # 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 o...
# -*- coding: utf-8 -*- """Contains helper functions for generating correctly formatted hgrid list/folders. """ import datetime import hurry.filesize from modularodm import Q from framework.auth.decorators import Auth from website.util import paths from website.util import sanitize from website.settings import ( ...
import tensorflow as tf import numpy as np import random from datetime import datetime from neuralnet.cross_cnn import cross_cnn from neuralnet.single_cnn import single_cnn from neuralnet.single_bi_lstm import single_bi_lstm from neuralnet.cross_bi_lstm import cross_bi_lstm from neuralnet.single_cnn_lstm import single_...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import warnings from contextlib import contextmanager from copy import copy from django.utils.deprecation import RemovedInDjango20Warning # Hard-coded processor for easier use of CSRF protection. _builtin_context_processors = ('django.template.context_processors.csrf',) _current_app_undefined = object() class Cont...
import math from time import gmtime, strftime import os import shutil import random import string from os import listdir import StringIO import gzip from os.path import exists,isfile, join import socket import sys from utils.rsacrypt import RSACrypt from utils.colors import bcolors from utils.colors import update_progr...
import astropy.cosmology as co aa=co.Planck15 import astropy.io.fits as fits import matplotlib.pyplot as p import numpy as n import os import sys # global cosmo quantities z_min = float(sys.argv[1]) z_max = float(sys.argv[2]) #imf = 'kroupa' #lO2_min = float(sys.argv[3]) # 'salpeter' SNlimit = 5 smf_ilbert13 = lamb...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import unittest from _pydev_imps import _pydev_thread try: import Queue except: import queue as Queue #@UnresolvedImport from _pydevd_bundle.pydevd_constants import * #@UnusedWildImport from _pydev_runfiles import pydev_runfiles_xml_rpc import time import os #===================================================...
#!/usr/bin/python __author__ = 'ejk' ''' The bootstrap-salt.sh script here is a direct copy of github.bom/saltstack/salt-bootstrap you can find the authors of that script here https://github.com/saltstack/salt-bootstrap/blob/develop/AUTHORS.rst all credit to them for that fine piece of work''' import subpro...
#! /usr/bin/env python from __future__ import absolute_import, division, print_function from __future__ import unicode_literals from pkg_resources import resource_filename import nose from nose.tools import assert_equal, assert_equals, assert_false, \ assert_true, assert_is_instance import numpy as np import s...
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. pytest fixtures for the entity test suite. """ from pytest import fixture # pylint: disable=E0611 from pytest import yield_fixture # pylint: disable=E0611 f...
# Copyright 2012 Big Switch Networks, Inc. # All Rights Reserved. # # 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...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Recipe module to ensure a checkout is consistant on a bot.""" from recipe_engine import recipe_api class BotUpdateApi(recipe_api.RecipeApi): def __...
#!/usr/bin/env python # -*- coding: utf-8 -*- # SVG transformation list parser # # Copyright 2010 Louis Simard # # This file is part of Scour, http://www.codedread.com/scour/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # 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 requ...
""" kombu.transport.zmq =================== ZeroMQ transport. """ from __future__ import absolute_import import errno import os import socket try: import zmq from zmq import ZMQError except ImportError: zmq = ZMQError = None # noqa from kombu.five import Empty from kombu.log import get_logger from kom...
""" An example of `qconcurrency.widgets.SessionList` This is a heavily modified `QListWidget` that facilitates storig all changes in memory until you want to perform a database-save operation. For example: * load 5x items from the database * change 1x item * add 2x items * delete 1x item * save ...
import json import sys import glob import os import argparse import re import base64 import gzip class AppSvcsBuilder: _apl_validators = { 'ipaddr':'IpAddress', 'port':'PortNumber', 'number':'NonNegativeNumber', 'allnumber':'Number', 'iporfqdn':'IpOrFqdn', 'fqdn':'FQDN' } options = { 'preso': os.path...
import bisect import difflib import sys import warnings import rope.base.oi.doa import rope.base.oi.objectinfo import rope.base.oi.soa from rope.base import ast, exceptions, taskhandle, utils, stdmods from rope.base.exceptions import ModuleNotFoundError from rope.base.pyobjectsdef import PyModule, PyPackage, PyClass i...
''' Finding Strongly-Connected Components of a graph Kosaraju's Two-Pass Algorithm ''' import sys from collections import defaultdict, deque def load_data(filename): graph = defaultdict(list) max = 0 with open(filename) as stream: l = stream.readline() while l: parts = [in...
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details # $URI:$ __version__=''' $Id: utils.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__='''Gazillions of miscellaneous internal utility functions''' import os, sys, imp, time import base64 import pickle from io import BytesIO import hashlib f...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
<<<<<<< HEAD <<<<<<< HEAD """ Tests common to genericpath, macpath, ntpath and posixpath """ import genericpath import os import sys import unittest import warnings from test import support def safe_rmdir(dirname): try: os.rmdir(dirname) except OSError: pass class GenericTest: common_at...
#! /usr/bin/env python """ The MIT License (MIT) Copyright (c) 2015 creon (creon.nu@gmail.com) 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from __future__ import with_statement import collections import os import signal import sys from six.moves import _thread import time import argparse import six import plop.platform class Collector(object): MODES = { 'prof': (plop.platform.ITIMER_PROF, signal.SIGPROF), 'virtual': (plop.platform.IT...
# Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-bitcoinrpc to module search path: import os import sys from decimal impor...
"""Implementation of JSONDecoder """ import re import sys import struct from lib.simplejson.scanner import make_scanner try: from lib.simplejson._speedups import scanstring as c_scanstring except ImportError: c_scanstring = None __all__ = ['JSONDecoder'] FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _fl...
# Copyright 2015 Internap. # # 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...
# support_oppose_deciding/controllers.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from ballot.controllers import figure_out_google_civic_election_id_voter_is_watching from ballot.models import CANDIDATE, MEASURE, OFFICE, BallotItemListManager from candidate.models import CandidateManager, Candidat...
# Copyright 2017 Google Inc. All Rights Reserved. # # 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 -*- # # django-autocomplete-light documentation build configuration file, created by # sphinx-quickstart on Wed Feb 3 02:03:57 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogen...
import io import unittest from unittest.mock import Mock, patch, PropertyMock from src.gene import Gene # Some mock functions def no_start_no_stop(self, item): return False def start_stop(self, item): return True def start_no_stop(self, item): if item == 'start_codon': return True return Fals...
#!/usr/bin/env python3 """ This is an utility script that allows to generate EOS S3 IOMUX configuration either from data in JSON format or from the given EBLIF netlist plus PCF constraints of the FPGA design. """ import argparse import csv import json import re import sys from lib.parse_pcf import parse_simple_pcf fro...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
#!/usr/bin/env python import unittest from pentai.base.board import * import pentai.base.mock as mock_m from pentai.ai.priority_filter_2 import * from pentai.ai.utility_filter import * class UtilityFilterTest(unittest.TestCase): def setUp(self): self.ab_game = mock_m.Mock() self.ab_game.mockAddRe...
""" "Make fixture" command. Highly useful for making test fixtures. Use it to pick only few items from your data to serialize, restricted by primary keys. By default command also serializes foreign keys and m2m relations. You can turn off related items serialization with --skip-related option. How to use: python ...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
'''Devices =========== Defines some of the devices that are used in the experiment. ''' __all__ = ( 'FTDIOdorsBase', 'FTDIOdorsSim', 'FTDIOdors', 'DAQInDeviceBase', 'DAQInDeviceSim', 'DAQInDevice', 'DAQOutDeviceBase', 'DAQOutDeviceSim', 'DAQOutDevice') from weakref import ref from moa.device.digital im...
from sympy.combinatorics.permutations import (Permutation, perm_af_parity, perm_af_mul, perm_af_muln, cyclic) from sympy.utilities.pytest import raises def test_Permutation(): p = Permutation([2, 5, 1, 6, 3, 0, 4]) q = Permutation([[1], [0, 3, 5, 6, 2, 4]]) assert Permutation(p.cyclic_form).array_for...
# Copyright (C) 2003-2007 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your op...
# Copyright 2021, 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 agreed to in writing...
#!/usr/bin/env python # version __id__ = "$Id: aboutdialog.py 1193 2007-05-03 17:29:59Z dmitriy $" __revision__ = "$Revision: 1193 $" import wx import os import sys import logging from wx.lib.scrolledpanel import ScrolledPanel from sas.sasgui.guiframe.events import StatusEvent from sas.sasgui.guiframe.panel_base impo...
#!/usr/bin/env python3 """A utility script for automating the beets release process. """ import click import os import re import subprocess from contextlib import contextmanager import datetime BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) CHANGELOG = os.path.join(BASE, 'docs', 'changelog.rst') ...
from __future__ import print_function import shutil import getopt import os, sys from glob import glob from collections import namedtuple __author__ = 'antoine waugh: antoine@reltech.com' TestAction = namedtuple('TestAction', 'name is_async') SINGLE_LINE_COMMENT = '//' ANNOTATION = '//@' NEWLINE = '\n' def usage():...
"""rbf - Radial basis functions for interpolation/smoothing scattered Nd data. Written by John Travers <jtravs@gmail.com>, February 2007 Based closely on Matlab code by Alex Chirokov Additional, large, improvements by Robert Hetland Some additional alterations by Travis Oliphant Permission to use, modify, and distrib...
# Copyright 2018 The TensorFlow Authors All Rights Reserved. # # 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 applica...
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from ...
#!/usr/bin/python2 # Copyright (c) 2013, Rethink Robotics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this l...
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HUnitR07c_CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HUnitR07c_CompleteLHS """ # Flag this instance as compiled now self.is_compiled = True sup...
""" This file provides fallback data for info attributes that are required for building OTFs. There are two main functions that are important: * :func:`~getAttrWithFallback` * :func:`~preflightInfo` There are a set of other functions that are used internally for synthesizing values for specific attributes. These can ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
#!/usr/bin/env python3 import os import pickle import prody from time import perf_counter # own modules import consensx.graph as graph import consensx.calc as calc from consensx.misc.natural_sort import natural_sort from .models import CSX_upload def get_pdb_models(path): pdb_models = [] for file in os.list...
#!/usr/bin/python -u import sys import os import subprocess import time from datetime import datetime import shutil import tempfile import hashlib import re import logging import argparse ################ #### Telegraf Variables ################ # Packaging variables PACKAGE_NAME = "telegraf" INSTALL_ROOT_DIR = "/us...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
# Copyright 2017 Battelle Energy Alliance, 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 agreed t...
""" To run this test, type this in command line <kolibri manage test -- kolibri.core.content> """ import datetime import unittest import uuid import mock import requests from django.conf import settings from django.core.cache import cache from django.core.urlresolvers import reverse from django.test import TestCase fr...
# Copyright 2015 IBM Corp. # # 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 agree...
import asyncio import gzip import logging import os from concurrent.futures import CancelledError from json.decoder import JSONDecodeError from ..specs.specs import resolve_executor from ..status import status_mgr from ..utilities.stat_utils import STATS_DPP_KEY, STATS_OUT_DP_URL_KEY from ..utilities.extended_json imp...
# -*- coding: utf-8 -*- """ S3 SVG codec @copyright: 2013-2021 (c) Sahana Software Foundation @license: MIT 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 re...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import datetime import os import sys import getpass import bit.config as config import bit.git as git import bit._owncloud as owncloud def list_upload(base_destination,list_of_files): upload_di...
from __future__ import unicode_literals from collections import defaultdict from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import connection from django.db import models, router, transaction, DEFAULT_DB_ALIAS from django.db.models import signals,...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: ui_field_outer_class.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflect...
# -*- coding: utf-8 -*- """This file contains a plugin for parsing Google Analytics cookies.""" import urllib from plaso.containers import time_events from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers.cookie_plugins import interface from plaso.parsers.cookie_plugins import manager # T...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
# Copyright 2014 Cloudbase Solutions Srl # # 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 ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Faq.question_details' db.add_column(u'pleiapp_faq', 'question_details', ...
# -*- coding: utf-8 -*- """ @file @brief Defines a :epkg:`sphinx` extension which if all parameters are documented. """ import inspect from docutils import nodes import sphinx from sphinx.util import logging from sphinx.util.docfields import DocFieldTransformer, _is_single_paragraph from .import_object_helper import im...
# Copyright (c) 2009-2021 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 ...
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class UpdateDirectorRequest(object): """ NOTE: This clas...
# coding=utf-8 # Copyright 2022 The Tensor2Tensor Authors. # # 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...
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
# -*- coding: utf-8 -*- """The parsers and plugins manager.""" from __future__ import unicode_literals import pysigscan from plaso.filters import parser_filter from plaso.lib import specification class ParsersManager(object): """The parsers and plugins manager.""" _parser_classes = {} @classmethod def Cr...
#!/usr/bin/env python2 # Import libraries try: import pygame_sdl2 pygame_sdl2.import_as_pygame() import pygame, math, random, sys, menu, settings from pygame.locals import * except: import pygame, math, random, sys, menu, settings from pygame.locals import * def play(): cnt = 0 dec = Fa...
#!/usr/bin/env python from click.testing import CliRunner from enasearch.cli import cli def test_get_results(): """Test get_results command of enasearch""" runner = CliRunner() result = runner.invoke(cli, ['get_results']) assert result.exit_code == 0 assert result.output.find('tsa_set') != -1 de...
""" Openflow tests on an l2 table """ import sys import os import time import logging from oftest import config import oftest.base_tests as base_tests import ofp from oftest.testutils import * from oftest.parse import parse_mac import openflow_base_tests from utils import * from p4_pd_rpc.ttypes import * from res...
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
# -*- coding: utf-8 -*- # Django settings for olympia project. import logging import os import socket import dj_database_url from django.utils.functional import lazy from heka.config import client_from_dict_config ALLOWED_HOSTS = [ '.allizom.org', '.mozilla.org', '.mozilla.com', '.mozilla.net', ] LO...
"""Perform streaming post-alignment preparation -- de-duplication and sorting. Centralizes a pipelined approach to generating sorted, de-duplicated BAM output from sequencer results. samblaster: http://arxiv.org/pdf/1403.7486v1.pdf biobambam bammarkduplicates: http://arxiv.org/abs/1306.0836 """ import contextlib impo...
""" Provider that returns vector representation of features in a data source. This is a provider that does not return an image, but rather queries a data source for raw features and replies with a vector representation such as GeoJSON. For example, it's possible to retrieve data for locations of OpenStreetMap points o...
import numpy as np from scipy.linalg import lstsq from scipy.optimize import leastsq from coordinateSystems import GeographicSystem from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt from matplotlib.patches import Ellipse def travel_time(X, X_ctr, c, t0=0.0, get_r=False): """ Units are meter...
""" Adapted from https://github.com/tornadomeet/ResNet/blob/master/symbol_resnet.py Original author Wei Wu Referenced https://github.com/bamos/densenet.pytorch/blob/master/densenet.py Original author bamos Referenced https://github.com/andreasveit/densenet-pytorch/blob/master/densenet.py Original author andreasveit Ref...
import datetime import pickle import unittest import uuid from copy import deepcopy from django.core.exceptions import FieldError from django.db import DatabaseError, connection, models from django.db.models import CharField, Q, TimeField, UUIDField from django.db.models.aggregates import ( Avg, Count, Max, Min, S...
"""Structure container types. A pstruct.type is used to create a data structure that is keyed by field names. There are a few basic methods that are provided for a user to derive information from an instantiated type. A pstruct.type's interface inherits from ptype.container and will always have a .value that's a list....
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
from .operations import Operations from .migration import MigrationContext from . import util class EnvironmentContext(object): """Represent the state made available to an ``env.py`` script. :class:`.EnvironmentContext` is normally instantiated by the commands present in the :mod:`alembic.command` m...
#!/usr/bin/python # Copyright 2014 Brno University of Technology (author: Karel Vesely) # 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 # # TH...
# Copyright 2015 Novo Nordisk Foundation Center for Biosustainability, DTU. # 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 ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
#!/usr/local/bin/python #- # Copyright (c) 2010-2011 Varnish Software AS # All rights reserved. # # Author: Poul-Henning Kamp <phk@phk.freebsd.dk> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions o...
# Configuration file for ipython-notebook. c = get_config() #------------------------------------------------------------------------------ # NotebookApp configuration #------------------------------------------------------------------------------ # NotebookApp will inherit config from: BaseIPythonApplication, Appli...
"""Constants for the Garmin Connect integration.""" from homeassistant.const import DEVICE_CLASS_TIMESTAMP DOMAIN = "garmin_connect" ATTRIBUTION = "Data provided by garmin.com" GARMIN_ENTITY_LIST = { "totalSteps": ["Total Steps", "steps", "mdi:walk", None, True], "dailyStepGoal": ["Daily Step Goal", "steps", ...
""" Make sure that a service object is aliasing container and host_config correctly """ from copy import deepcopy import os from os.path import join import tempfile import unittest from control.exceptions import InvalidControlfile from control.service import Startable, Buildable, BSService from control.service.servic...