gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import functools import glob import gzip import os import sys import warnings import zipfile from itertools import product from django.apps import apps from django.conf import settings from django.core import serializers from django.core.exceptions import ImproperlyConfigured from django.core.management.base import Ba...
import time from django import forms from django.contrib.contenttypes.models import ContentType from django.utils.crypto import salted_hmac, constant_time_compare from ratings import cookies, exceptions from ratings.forms.widgets import SliderWidget, StarWidget class VoteForm(forms.Form): """ Form class to ...
from itertools import product from collections import defaultdict, OrderedDict import h5py import numpy import tables from six.moves import zip, range from fuel.datasets import Dataset from fuel.utils import do_not_pickle_attributes @do_not_pickle_attributes('nodes', 'h5file') class PytablesDataset(Dataset): ""...
"""Manages the creation and deployment of desired services configuration.""" # coding=utf-8 # # Copyright (c) 2017-2021 F5 Networks, 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 # # ...
from __future__ import unicode_literals import datetime from dateutil.parser import parse from decimal import Decimal import re try : from django.utils import importlib except ImportError: import importlib from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.utils import da...
import argparse from os.path import join import re from subprocess import CalledProcessError, check_output, STDOUT import sys from packaging.version import Version as V try: import colorama def bright(text): return "%s%s%s" % (colorama.Style.BRIGHT, text, colorama.Style.RESET_ALL) def dim(text): return ...
''' Created on 12/12/2017 @author: Liza L. Lemos <lllemos@inf.ufrgs.br> ''' from environment import Environment import traci import sumolib from xml.dom import minidom import sys, os import subprocess import atexit from contextlib import contextmanager import time from array import array import numpy as np import dat...
# 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...
#! /usr/bin/env python from __future__ import unicode_literals import datetime import json import unittest from test_lib.datablob_factory import DataBlobFactory from lib.constants import DATA_BLOB as d from lib.constants import HTTP_CODE as http_code from lib.constants import NFL as nfl from lib.constants import SCO...
# # 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...
# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # http://aws.amazon.com/apache2.0/ # or in the "license" file a...
from django.db import connection from django.conf import settings import numpy as np import yaml import simplejson as json from operator import itemgetter import requests import logging logger = logging.getLogger(__name__) def custom_sql(query, params): cursor = connection.cursor() cursor.execute(query, param...
"""Partial dependence plots for tree ensembles. """ # Authors: Peter Prettenhofer # License: BSD 3 clause # Note: function here are deprecated. We don't call the new versions because # the API slightly changes (namely partial_dependence does not have the grid # parameter anymore.) from itertools import count import ...
"""CherryPy tools. A "tool" is any helper, adapted to CP. Tools are usually designed to be used in a variety of ways (although some may only offer one if they choose): Library calls All tools are callables that can be used wherever needed. The arguments are straightforward and should be detailed w...
# 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 ...
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. 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 # noti...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import six import pytest from sentry.grouping.enhancer import Enhancements, InvalidEnhancerConfig def dump_obj(obj): if not isinstance(getattr(obj, "__dict__", None), dict): return obj rv = {} for (key, value) in six...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
# Copyright (c) 2015 Thales Services SAS # # 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 l...
""" RTFM: * http://docs.python.org/2/library/cookielib.html#cookie-objects Some code got from https://github.com/kennethreitz/requests/blob/master/requests/cookies.py """ from __future__ import absolute_import from six.moves.http_cookiejar import CookieJar, Cookie import json import logging from grab.error impor...
# device.py # Author: Meghan Clark # This file contains a Device object that exposes a high-level API for interacting # with a LIFX device, and which caches some of the more persistent state attributes # so that you don't always need to spam the light with packets. # # The Device object also provides the low-level work...
import pytest @pytest.fixture def base_url(): return 'https://www.encodeproject.org/' @pytest.fixture def assembly(): return 'GRCh38' @pytest.fixture def keypair(): return ('ABC', '123') @pytest.fixture def histone_qc(): return { "@type": [ "HistoneChipSeqQualityMetric", ...
from random import randint def simple_patch(): """Return a one-oscillator patch.""" patch = ESQ1Patch() patch.oscillators[0].dca_enable.set_maximum() patch.oscillators[0].dca_level.set_maximum() patch.miscellaneous.frequency.set_maximum() patch.miscellaneous.dca4_modulation_amount.set_maximu...
from copy import copy __author__ = 'Anthony' import numpy as np import cv2 import cv from scipy.cluster.hierarchy import fclusterdata from scipy.spatial.distance import pdist, squareform from hungarian import linear_assignment show_sub_img = False show_raw_img = False show_cluster_img = True show_kalman_img = True su...
# encoding: utf-8 """ Step implementations for document-related features """ from __future__ import absolute_import, print_function, unicode_literals from behave import given, then, when from docx import Document from docx.enum.section import WD_ORIENT, WD_SECTION from docx.shape import InlineShapes from docx.share...
# 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...
# 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/python -tt # # Copyright (c) 2011 Intel, Inc. # # 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; version 2 of the License # # This program is distributed in the hope that it will be us...
import argparse import time from tornado import ioloop, httpclient from elasticsearch import Elasticsearch from datetime import datetime, timedelta import subprocess import logging import json import copy import uuid p_uid = uuid.uuid4().hex num_reqs = 0 # global variable to keep track of how many requests has bee...
# Copyright 2015 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 (c) 2002-2005, Jeremiah Fincher # 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 co...
from __future__ import absolute_import, print_function import time, rfc822 from xml.etree.cElementTree import Element, SubElement, tostring from xml.etree.ElementTree import _namespace_map from pony.templating import Html, StrHtml ns = 'http://www.w3.org/2005/Atom' _namespace_map.setdefault(ns, 'atom') # nsmap_key...
# 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 ...
#!/usr/bin/env python """beanstalkc - A beanstalkd Client Library for Python""" import logging import socket import sys __license__ = ''' Copyright (C) 2008-2016 Andreas Bolka Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obt...
import json, pickle from itertools import groupby from fronter import * class Survey(Tool): class Reply(object): Data = namedtuple('Data', ('delete', 'show')) def __init__(self, firstname, lastname, time, status, score, data): self.firstname = firstname self.las...
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # 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 # ...
import os from robot.libraries.BuiltIn import BuiltIn OPENBMC_BASE_URI = '/xyz/openbmc_project/' OPENBMC_BASE_DBUS = 'xyz.openbmc_project.' # org open power base URI. OPENPOWER_BASE_URI = '/org/open_power/' OPENPOWER_CONTROL = OPENPOWER_BASE_URI + 'control/' OPENPOWER_SENSORS = OPENPOWER_BASE_URI + 'sensors/' # REST...
# -*- 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 index on 'NGReport', fields ['report_date'] db.create_index('reports_ngreport', ['report_date']) ...
import CatalogItem from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.toon import ToonDNA import random from direct.showbase import PythonUtil from direct.gui.DirectGui import * from panda3d.core import * from panda3d.direct import * CTArticle = 0 CTString = 1 CTBasePr...
import hashlib import pytest import aiohttpretty from waterbutler.core import exceptions from waterbutler.providers.gitlab import GitLabProvider from waterbutler.providers.gitlab.path import GitLabPath from waterbutler.providers.gitlab.metadata import GitLabFileMetadata from waterbutler.providers.gitlab.metadata imp...
from contentbase.attachment import ItemWithAttachment from contentbase.schema_utils import ( load_schema, ) from contentbase import ( calculated_property, collection, ) from pyramid.traversal import find_root from .base import ( Item, paths_filtered_by_status, ) import json def includeme(config): ...
# Copyright (c) 2016 by Gilbert Ramirez <gramirez@a10networks.com> """ Show individual records, using logical syntax similar to the "find" command """ from instmakelib import instmake_log as LOG import sys import re import os description = "Find records using a syntax similar to 'find'" def usage(): print "find:"...
import yaml import logging import os from flask import _app_ctx_stack from werkzeug.local import LocalProxy from moxie.places.importers.loaders import OrderedDictYAMLLoader logger = logging.getLogger(__name__) # ID's are used to identify the doc, doens't make sense to merge # Solr will complain if this is done as ...
import unittest, os, os.path, sys sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')) import backend backend.load() class GCCBackendTest(unittest.TestCase): def setUp(self): self.runner = backend.Runner() def test_compile(self): res = self.runner.delegate({ ...
'''Skype client user interface control. ''' from enums import * from errors import ISkypeError from utils import * import weakref class IClient(object): '''Represents a Skype client. Access using L{ISkype.Client<skype.ISkype.Client>}. ''' def __init__(self, Skype): '''__init__. @param S...
"""Tests for classes defining properties of ground domains, e.g. ZZ, QQ, ZZ[x] ... """ from sympy import S, sqrt, sin, oo, Poly, Float from sympy.abc import x, y, z from sympy.polys.domains import ZZ, QQ, RR, CC, FF, GF, EX from sympy.polys.domains.realfield import RealField from sympy.polys.rings import ring from s...
import datetime import hashlib import itertools import os import json import random import tempfile from zipfile import ZipFile, ZIP_DEFLATED from django.conf import settings import pydenticon import requests import mkt from mkt.constants.applications import DEVICE_CHOICES_IDS from mkt.constants.base import STATUS_C...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-21 22:17 from __future__ import unicode_literals import autoslug.fields import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_project.mixins import django_project.models imp...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for the epsf module. """ import itertools from astropy.modeling.fitting import LevMarLSQFitter from astropy.nddata import NDData from astropy.table import Table from astropy.stats import SigmaClip from astropy.utils.exceptions import AstropyUse...
# 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 use ...
# 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, software # d...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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-...
""" HIPE functions. """ def mkLinemask(obs, freqRanges=None, lineFreqs=None, vexp=15, usevexp=True, \ lineWidths=None, vlsr=0): """ mkLinemask(obs, freqRanges=None, lineFreqs=None, vexp=15, usevexp=True, \ lineWidths=None, vlsr=0) Make Linemask table for HIFI pointed-observation ...
__author__ = 'Tom Schaul, tom@idsia.ch' from scipy import argmax, array from random import sample, choice, shuffle from pybrain.utilities import fListToString, Named class Coevolution(Named): """ Population-based generational evolutionary algorithm with fitness being based (paritally) on a relative measure....
# Copyright (c) 2012 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. """Generic utils.""" import codecs import errno import logging import os import Queue import re import stat import sys import tempfile import threading ...
"""Transport implementation.""" # Copyright (C) 2009 Barry Pederson <bp@barryp.org> from __future__ import absolute_import, unicode_literals import errno import re import socket import ssl from contextlib import contextmanager from .exceptions import UnexpectedFrame from .five import items from .platform import KNOWN...
# -*- coding: utf-8 -*- """ =============================================================================== module __OrdinaryPercolation__: Ordinary Percolation Algorithm =============================================================================== """ import scipy as sp import numpy as np import matplotlib.pyplot ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils: Various utilities methods. """ __author__ = "Andrea Ballatore" __copyright__ = "Copyright 2014" __license__ = "" __version__ = "0.1" __maintainer__ = "" __email__ = "" __date__ = "December 2014" __status__ = "Development" import logging import math import re de...
# Copyright (C) 2020 NTT DATA # 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 NetApp, 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.or...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
"""runpy.py - locating and running Python code using the module namespace Provides support for locating and running Python scripts using the Python module namespace instead of the native filesystem. This allows Python code to play nicely with non-filesystem based PEP 302 importers when locating support scripts as wel...
# Copyright (c) 2012, Willow Garage, 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 co...
# Copyright 2015 gRPC 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 law or agreed to in writing...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from googleapiclient.discovery import build import fnmatch import json import os import glob import shutil import esprima import argparse import re def fileSearchReplace(filepath, findStr, replaceStr): """Open a file and find/replace all matches""" with open(f...
# -*- coding: utf-8 -*- """ Single VsOne Chip Match Interface For VsMany Interaction Interaction for looking at matches between a single query and database annotation Main development file CommandLine: python -m ibeis.viz.interact.interact_matches --test-show_coverage --show """ from __future__ import absolute_i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2010, Monash e-Research Centre # (Monash University, Australia) # Copyright (c) 2010, VeRSI Consortium # (Victorian eResearch Strategic Initiative, Australia) # All rights reserved. # Redistribution and use in source and binary forms, with or without #...
# 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 use ...
# nls/model.py # This module define core abstractions that maps to problem and model definition. # (c) Daniel Bershatsky, 2016 # See LICENSE for details from __future__ import absolute_import, print_function from pprint import pprint from time import time from types import FunctionType from datetime import da...
import sys import petsc4py petsc4py.init(sys.argv) # from scipy.io import savemat, loadmat # from src.ref_solution import * # import warnings # from memory_profiler import profile # from time import time from src.myio import * from src.objComposite import * from src.StokesFlowMethod import * from src.geo import * fro...
# # 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 us...
# Copyright (c) The University of Edinburgh 2014 # # 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...
# -*- coding: utf-8 -*- __author__ = 'lightrevan' import unittest import tempfile import os import re from log_parser.file_parsers import * from log_parser.row_parsers import * from log_parser_tests.mocks_and_stubs import * class SingleLineFileParserTest(unittest.TestCase): def setUp(self): data = [('1 ...
"""The tests for the Demo Media player platform.""" import socket import unittest import soco.snapshot from unittest import mock import soco from homeassistant.bootstrap import setup_component from homeassistant.components.media_player import sonos, DOMAIN from homeassistant.components.media_player.sonos import CONF_I...
# -*- coding: utf-8 -*- # Copyright 2022 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...
#!/usr/bin/env python # coding:utf-8 import errno import time import re import socket import ssl import httplib import OpenSSL NetWorkIOError = (socket.error, ssl.SSLError, OpenSSL.SSL.Error, OSError) from connect_manager import https_manager from gae_handler import return_fail_message from google_ip import googl...
import itertools from sympy import (Add, Pow, Symbol, exp, sqrt, symbols, sympify, cse, Matrix, S, cos, sin, Eq, Function, Tuple, RootOf, IndexedBase, Idx, Piecewise, O) from sympy.simplify.cse_opts import sub_pre, sub_post from sympy.functions.special.hyper import meijerg from sy...
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
# Copyright 2013 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. from core import perf_benchmark from benchmarks import silk_flags from measurements import smoothness import page_sets import page_sets.key_silk_cases from ...
from sympy import (EmptySet, FiniteSet, S, Symbol, Interval, exp, erf, sqrt, symbols, simplify, Eq, cos, And, Tuple, Or, Dict, sympify, binomial, factor, cancel) from sympy.stats import (DiscreteUniform, Die, Bernoulli, Coin, Binomial, Hypergeometric, P, E, variance, covariance, skewness, sample...
import salt.modules.win_powercfg as powercfg from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, call, patch from tests.support.unit import TestCase class PowerCfgTestCase(TestCase, LoaderModuleMockMixin): """ Validate the powercfg state """ def setup_load...
#!/usr/bin/env python # # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp> # # 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...
# Copyright 2014 varnishapi authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import os import unittest import mock from feaas import managers, storage as api_storage from feaas.managers import ec2 class EC2ManagerTestCase(unittest.T...
from unittest import TestCase from protojson import pbliteserializer, alltypes_pb2 def _getExpectedDefaults(): expectedDefaults = [ None, # 0 0, # 1 1, # 2 0, # and so on 0, 0, 0, 0, 0, 0, 0, 1.5, 0, 0, u'', 'moo', [ # 16 None, None, None, None, None, None, None, None, None, N...
# Copyright 2013 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. import logging import time import traceback from app_yaml_helper import AppYamlHelper from appengine_wrappers import ( GetAppVersion, DeadlineExceededEr...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/RiskAssessment) on 2019-05-07. # 2019, SMART Health IT. from . import domainresource class RiskAssessment(domainresource.DomainResource): """ Potential outcomes for a subject with lik...
# -*- coding: utf-8 -*- import weakref from ..Qt import QtCore, QtGui from .Container import * from .DockDrop import * from .Dock import Dock from .. import debug as debug from ..python2_3 import basestring class DockArea(Container, QtGui.QWidget, DockDrop): def __init__(self, temporary=False, home=None): ...
import numpy import chainer from chainer.backends import cuda from chainer.functions.activation import lstm from chainer.functions.array import reshape from chainer.functions.array import stack from chainer.functions.connection import linear from chainer.functions.connection import n_step_rnn from chainer.utils import...
from __future__ import unicode_literals import boto.kinesis from boto.kinesis.exceptions import ResourceNotFoundException, InvalidArgumentException import sure # noqa from moto import mock_kinesis @mock_kinesis def test_create_cluster(): conn = boto.kinesis.connect_to_region("us-west-2") conn.create_strea...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow_serving/apis/prediction_service.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.p...
import sys import os import gc import threading import numpy as np from numpy.testing import assert_equal, assert_, assert_allclose from scipy.sparse import (_sparsetools, coo_matrix, csr_matrix, csc_matrix, bsr_matrix, dia_matrix) from scipy.sparse.sputils import supported_dtypes, matrix fro...
#!/usr/bin/python # # Copyright Google 2007-2008, 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 ...
#!/usr/bin/python2 # -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # 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 co...
# Software License Agreement (BSD License) # # Copyright (c) 2013, Willow Garage, 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...
#! /usr/bin/env python2 import argparse from RecBlastUtils import * import csv_transformer import taxa_to_taxid from uuid import uuid4 import part_one import part_two import part_three from RecBlastFigures import * # this will be the stand alone version of RecBlast for linux. __version__ = "1.1.2" # flags: # DEBUG ...
"""Factory function to initialize KNX devices from config.""" from __future__ import annotations from xknx import XKNX from xknx.devices import ( BinarySensor as XknxBinarySensor, Climate as XknxClimate, ClimateMode as XknxClimateMode, Cover as XknxCover, Device as XknxDevice, Fan as XknxFan, ...
""" test parquet compat """ import pytest import datetime from distutils.version import LooseVersion from warnings import catch_warnings import numpy as np import pandas as pd from pandas.compat import PY3, is_platform_windows, is_platform_mac from pandas.io.parquet import (to_parquet, read_parquet, get_engine, ...
# Copyright 2014 The Oppia 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 applicable ...
#!/usr/bin/env python import os import hashlib import sys import json import time ################################################################################ # Overview ################################################################################ # Cashier hashes a directory. Any modification to file contents...